没找到课程" mono.android.app.Application"

时间:2014-09-10 07:25:19

标签: android mono xamarin xamarin.android

我的Xamarin Android应用程序已经投入使用,人们正在从Google Play下载它,一切似乎都很好,除非我在Google Play开发者控制台中遇到以下错误:

java.lang.RuntimeException: Unable to instantiate application mono.android.app.Application:          java.lang.ClassNotFoundException: Didn't find class "mono.android.app.Application" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib, /vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:559)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5119)
at android.app.ActivityThread.access$1500(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1418)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5867)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "mono.android.app.Application" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:982)
at android.app.LoadedApk.makeApplication(LoadedApk.java:550)
... 11 more

或类似但略有不同的版本:

java.lang.RuntimeException: Unable to instantiate application mono.android.app.Application: java.lang.ClassNotFoundException: Didn't find class "mono.android.app.Application" on path: /mnt/asec/myapp-1/pkg.apk
at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4563)
at android.app.ActivityThread.access$1400(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "mono.android.app.Application" on path: /mnt/asec/myapp-1/pkg.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newApplication(Instrumentation.java:985)
at android.app.LoadedApk.makeApplication(LoadedApk.java:499)
... 11 more

我的ClassNotFoundException + mono.android.app.Application的谷歌搜索结果为零。根据开发者控制台,它来自Android 4.2和4.4。,不同的设备(HTC,三星......),甚至来自我测试过的设备,一切正常(HTC One)。

有什么想法吗?是单声道的这个错误吗?还是Xamarin?或者我做错了什么?

1 个答案:

答案 0 :(得分:0)

每当xamarin app安装在设备中时,它就会找到单声道运行时支持lib,如果它没有安装在设备中,那么它将停止运行,所以,如果你没有单声道安装运行,你可以改变一些设置:

  

Property => Android选项

转到打包并只选择一个Bundle程序集到本机代码中,然后转到链接器并选择链接None然后运行它。

我希望它可能有用。