安装项目并尝试在我的Android设备上运行时,会显示以下错误消息:
“应用程序AndroidTest(进程com.Test.AndroidTest)意外停止。请再试一次。”
我在设备上的Android版本是2.3.5我正在为Unity中最低的构建选项构建它,这是Android 2.3.1 API级别9。
请有人帮忙吗?
这是日志文件:
03-17 23:32:55.374 I/ActivityManager( 127): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.Test.AndroidTest/com.unity3d.player.UnityPlayerNativeActivity } from pid 236
03-17 23:32:55.414 I/[POST_RESELECT]( 236): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@400e4f40,-1,0,-1,0)
03-17 23:32:55.424 I/[POST_RESELECT]( 236): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@401052c8,-1,0,-1,0)
03-17 23:32:55.444 I/[POST_RESELECT]( 236): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@400e4f40,-1,0,-1,0)
03-17 23:32:55.444 I/[POST_RESELECT]( 236): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@401052c8,-1,0,-1,0)
03-17 23:32:55.444 D/PhoneWindow( 236): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@40587178 has no id.
03-17 23:32:55.444 D/Background traffic light( 236): traffic light: GREEN, mBackgroundTrafficLight = false
03-17 23:32:55.474 I/ActivityManager( 127): Start proc com.Test.AndroidTest for activity com.Test.AndroidTest/com.unity3d.player.UnityPlayerNativeActivity: pid=16583 uid=10075 gids={}
03-17 23:32:55.565 W/dalvikvm( 236): disableGcForExternalAlloc: false
03-17 23:32:55.575 W/dalvikvm( 236): disableGcForExternalAlloc: false
03-17 23:32:55.635 D/AndroidRuntime(16583): Shutting down VM
03-17 23:32:55.635 W/dalvikvm(16583): threadid=1: thread exiting with uncaught exception (group=0x400205a0)
03-17 23:32:55.675 E/AndroidRuntime(16583): FATAL EXCEPTION: main
03-17 23:32:55.675 E/AndroidRuntime(16583): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Test.AndroidTest/com.unity3d.player.UnityPlayerNativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: main
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1830)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.ActivityThread.access$1500(ActivityThread.java:132)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.os.Handler.dispatchMessage(Handler.java:99)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.os.Looper.loop(Looper.java:150)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.ActivityThread.main(ActivityThread.java:4277)
03-17 23:32:55.675 E/AndroidRuntime(16583): at java.lang.reflect.Method.invokeNative(Native Method)
03-17 23:32:55.675 E/AndroidRuntime(16583): at java.lang.reflect.Method.invoke(Method.java:507)
03-17 23:32:55.675 E/AndroidRuntime(16583): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-17 23:32:55.675 E/AndroidRuntime(16583): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-17 23:32:55.675 E/AndroidRuntime(16583): at dalvik.system.NativeStart.main(Native Method)
03-17 23:32:55.675 E/AndroidRuntime(16583): Caused by: java.lang.IllegalArgumentException: Unable to find native library: main
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.NativeActivity.onCreate(NativeActivity.java:187)
03-17 23:32:55.675 E/AndroidRuntime(16583): at com.unity3d.player.UnityPlayerNativeActivity.onCreate(Unknown Source)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
03-17 23:32:55.675 E/AndroidRuntime(16583): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794)
03-17 23:32:55.675 E/AndroidRuntime(16583): ... 11 more
03-17 23:32:55.685 W/ActivityManager( 127): Force finishing activity com.Test.AndroidTest/com.unity3d.player.UnityPlayerNativeActivity
答案 0 :(得分:0)
我遇到了同样的问题。我通过更改支持ARMv7的仿真器设备解决了问题。也许您使用的设备不是ARMv7,或者您可以检查设置> Android>设备过滤器。希望这可以提供帮助。