CompatDelegateImplV14在Xamarin的An

CompatDelegateImplV14在Xamarin的An

本文介绍了java.lang.NoClassDefFoundError的:android.support.v7.app.AppCompatDelegateImplV14在Xamarin的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然开始,因为一个支持库的更新,它崩溃上启动应用程序,即使一切都建立精细收到此错误。我试图用低版本的包,这给了我同样的错误。我尝试了Xamarin和Android SDK完整的重新安装,并最终创建一个新的项目,该项目利用AppCompat,但没有成功。

Android的支持库v22.2

套餐:

  • Xamarin.Android.Support.v7.AppCompat v22.2
  • Xamarin.Android.Support.v7.MediaRouter v22.2
  • Xamarin.Android.Support.v4 v22.2
  • Xamarin.Android.Support.v13 v22.2
  • Xamarin.GooglePlayServices v22.2.0.2

调用堆栈:

  System.Diagnostics.Debugger.Mono_UnhandledException_internal()的
System.Diagnostics.Debugger.Mono_UnhandledException(EX = {java.lang.NoClassDefFoundError的:异常类型的java.lang.NoClassDefFoundError的被抛出。
在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&所述的IL 0x00011,0x00078>
在Android.Runtime.JNIEnv.CallNonvirtualVoidMethod(IntPtr的,IntPtr的,IntPtr的,Android.Runtime.JValue *)[0x00084]中/Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1029
在Android.App.Activity.OnCreate(Android.OS.Bundle)[0x00070]中/Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2725
在MyApp.MainActivity.OnCreate(Android.OS.Bundle)[0x0001f]在C:\ Users \用户管理\文件\项目\ MyApp的\ MyApp的\活动\ MainActivity.cs:43
在Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr的,IntPtr的,IntPtr的)[0x00011]中/Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2707
在(包装动态法)object.e364abe5-1498-42eb-85b3-b3d7986e8b04(IntPtr的,IntPtr的,IntPtr的)其中,IL 0x00017,0x00043>

  ---托管异常堆栈跟踪的结尾---
java.lang.NoClassDefFoundError的:android.support.v7.app.AppCompatDelegateImplV14
    在android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:93)
    在android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:77)
    在android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:429)
    在android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:57)
    在md5528fae1ec675c410de183ce65ec994d2.MainActivity.n_onCreate(本机方法)
    在md5528fae1ec675c410de183ce65ec994d2.MainActivity.onCreate(MainActivity.java:37)
    在android.app.Activity.performCreate(Activity.java:5933)
    在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
    在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
    在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405)
    在android.app.ActivityThread.access $ 800(ActivityThread.java:149)
    在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1324)
    在android.os.Handler.dispatchMessage(Handler.java:102)
    在android.os.Looper.loop(Looper.java:211)
    在android.app.ActivityThread.main(ActivityThread.java:5333)
    在java.lang.reflect.Method.invoke(本机方法)
    在java.lang.reflect.Method.invoke(Method.java:372)
    在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1016)
    在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
}) 在
Android.Runtime.UncaughtExceptionHandler.UncaughtException(线程=,=前)的/Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Runtime/UncaughtExceptionHandler.cs:35
Java.Lang.Thread.IUncaughtExceptionHandlerInvoker.n_UncaughtException_Ljava_lang_Thread_Ljava_lang_Throwable_在(参数=) /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Java.Lang.Thread.cs:221
object.ce1e54b9-203c-4387-b0fe-be79adb149c0在(参数=)
 

解决方案

今天,我重新安装所有的支持库,清理和重新编译应用程序,并错误就消失了。

Suddenly started receiving this error since a support library update, which crashes the application on launch, even if everything builds fine. I tried to use lower version packages, which gave me the same error. I tried complete reinstall of Xamarin and Android SDK and finally creating a new Project which uses AppCompat but no success.

Android Support Library v22.2

Packages:

  • Xamarin.Android.Support.v7.AppCompat v22.2
  • Xamarin.Android.Support.v7.MediaRouter v22.2
  • Xamarin.Android.Support.v4 v22.2
  • Xamarin.Android.Support.v13 v22.2
  • Xamarin.GooglePlayServices v22.2.0.2

Call Stack:

System.Diagnostics.Debugger.Mono_UnhandledException_internal () in
System.Diagnostics.Debugger.Mono_UnhandledException (ex={Java.Lang.NoClassDefFoundError: Exception of type 'Java.Lang.NoClassDefFoundError' was thrown.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00078>
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue*) [0x00084] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1029
at Android.App.Activity.OnCreate (Android.OS.Bundle) [0x00070] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2725
at MyApp.MainActivity.OnCreate (Android.OS.Bundle) [0x0001f] in c:\Users\Admin\Documents\Projects\MyApp\MyApp\Activities\MainActivity.cs:43
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2707
at (wrapper dynamic-method) object.e364abe5-1498-42eb-85b3-b3d7986e8b04 (intptr,intptr,intptr) <IL 0x00017, 0x00043>

  --- End of managed exception stack trace ---
java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14
    at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:93)
    at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:77)
    at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:429)
    at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:57)
    at md5528fae1ec675c410de183ce65ec994d2.MainActivity.n_onCreate(Native Method)
    at md5528fae1ec675c410de183ce65ec994d2.MainActivity.onCreate(MainActivity.java:37)
    at android.app.Activity.performCreate(Activity.java:5933)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405)
    at android.app.ActivityThread.access$800(ActivityThread.java:149)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:211)
    at android.app.ActivityThread.main(ActivityThread.java:5333)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
}) in
Android.Runtime.UncaughtExceptionHandler.UncaughtException (thread=, ex=) in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Runtime/UncaughtExceptionHandler.cs:35
Java.Lang.Thread.IUncaughtExceptionHandlerInvoker.n_UncaughtException_Ljava_lang_Thread_Ljava_lang_Throwable_ (Parameters=) in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Java.Lang.Thread.cs:221
object.ce1e54b9-203c-4387-b0fe-be79adb149c0 (Parameters=) in
解决方案

Today I reinstalled all the support libraries, cleaned and recompiled the app again and the error was gone.

这篇关于java.lang.NoClassDefFoundError的:android.support.v7.app.AppCompatDelegateImplV14在Xamarin的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 17:11