我创建了一个小应用程序。 当我尝试在genymotion模拟器上运行应用程序时,它会弹出一个" 不幸的是我的应用程序已停止"
申请表输出:
Forwarding debugger port 8834
Detecting existing process
[MultiDex] VM with version 1.6.0 does not have multidex support
[MultiDex] install
[MultiDex] MultiDexExtractor.load(/data/app/purposecolor.purposecolor-2.apk, false)
[MultiDex] Detected that extraction must be performed.
[MultiDex] load found 0 secondary dex files
[MultiDex] install done
[AndroidRuntime] Shutting down VM
[AndroidRuntime] FATAL EXCEPTION: main
[AndroidRuntime] java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_23 or Xamarin.Android.Platform!
[AndroidRuntime] at android.app.ActivityThread.installProvider(ActivityThread.java:4563)
[AndroidRuntime] at android.app.ActivityThread.installContentProviders(ActivityThread.java:4190)
[AndroidRuntime] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4132)
[AndroidRuntime] at android.app.ActivityThread.access$1300(ActivityThread.java:130)
[AndroidRuntime] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
[AndroidRuntime] at android.os.Handler.dispatchMessage(Handler.java:99)
[AndroidRuntime] at android.os.Looper.loop(Looper.java:137)
[AndroidRuntime] at android.app.ActivityThread.main(ActivityThread.java:4745)
[AndroidRuntime] at java.lang.reflect.Method.invokeNative(Native Method)
[AndroidRuntime] at java.lang.reflect.Method.invoke(Method.java:511)
[AndroidRuntime] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[AndroidRuntime] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[AndroidRuntime] at dalvik.system.NativeStart.main(Native Method)
[AndroidRuntime] Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_23 or Xamarin.Android.Platform!
[AndroidRuntime] at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
[AndroidRuntime] at android.app.ActivityThread.installProvider(ActivityThread.java:4560)
[AndroidRuntime] ... 12 more
[AndroidRuntime] Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.Platform
[AndroidRuntime] at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:210)
[AndroidRuntime] at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)
[AndroidRuntime] ... 13 more
[Process] Sending signal. PID: 1845 SIG: 9
使用Android版本进行编译:{{1}}
最低Android定位时间:Use Latest Platform (API Level 23(Xamarin.Android v6.0 Support))
目标Android版本:API Level 16(Xamarin.Android v4.1 Support)
答案 0 :(得分:0)
在项目选项中禁用Multi-Dex
解决了我的问题。
项目 - > 选项 - > Android Build - > 一般 - >取消选中启用Multi-Dex
感谢@AlexLipov给我提示
[MultiDex] load found 0 secondary dex files