支持v4 arraymap仅在kitkat设备中崩溃

时间:2015-12-31 10:13:38

标签: android google-play-services

Android应用程序崩溃时找不到错误类def:仅支持kitkat设备中的v4 arraymap。

Gradle Dependencies:

compile files('libs/cometchat-sdk.jar')
compile files('libs/jsoup-1.7.3.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/volley.jar')
// compile files('libs/android-support-v4.jar')
compile 'com.paypal.sdk:paypal-android-sdk:2.12.4'
compile files('libs/gcm.jar')
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'info.hoang8f:android-segmented:1.0.6'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.prolificinteractive:material-calendarview:0.8.1'
compile 'com.android.support:gridlayout-v7:22.0.0'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android.gms:play-services-base:8.3.0'
compile 'com.google.android.gms:play-services-maps:8.3.0'
// compile 'com.facebook.android:facebook-android-sdk:4.6.0'
// compile 'com.google.android.gms:play-services-plus:8.3.0'
// compile 'com.google.android.gms:play-services-identity:8.3.0'
compile('com.google.android.gms:play-services:8.3.0')
compile('com.twitter.sdk.android:twitter:1.8.0@aar') {
    transitive = true;
}

Log cat:

Process: java.lang.NoClassDefFoundError: android.support.v4.util.ArrayMap at
com.google.android.gms.measurement.internal.zzd.(Unknown Source) at 
com.google.android.gms.measurement.internal.zzx.zzh(Unknown Source) at 
com.google.android.gms.measurement.internal.zzt.(Unknown Source) at 
com.google.android.gms.measurement.internal.zzx.zzBQ(Unknown Source) at 
com.google.android.gms.measurement.internal.zzt.zzaU(Unknown Source) at 
com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source) at 
android.content.ContentProvider.attachInfo(ContentProvider.java:1591) at 
android.content.ContentProvider.attachInfo(ContentProvider.java:1562) at 
android.app.ActivityThread.installProvider(ActivityThread.java:4774) at 
android.app.ActivityThread.installContentProviders(ActivityThread.java:4369) at 
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4309) at 
de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) at 
de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631) at 
android.app.ActivityThread.handleBindApplication(Native Method) at 
android.app.ActivityThread.access$1500(ActivityThread.java:135) at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) at 
android.os.Handler.dispatchMessage(Handler.java:102) at 
android.os.Looper.loop(Looper.java:136) at 
android.app.ActivityThread.main(ActivityThread.java:5001) 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:785) at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at 
de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) at 
dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:2)

你到了

  

Log cat:进程:java.lang.NoClassDefFoundError:   android.support.v4.util.ArrayMap at   com.google.android.gms.measurement.internal.zzd。(未知来源)at   com.google.android.gms.measurement.internal.zzx.zzh(未知来源)at   com.google.android.gms.measurement.internal.zzt。(未知来源)at   com.google.android.gms.measurement.internal.zzx.zzBQ(未知来源)   在com.google.android.gms.measurement.internal.zzt.zzaU(未知   源)

当Java虚拟机无法在运行时找到编译时可用的特定类时,Java中出现

NoClassDefFoundError

所以导入 android.support.v4.util.ArrayMap而不是android.util.ArrayMap

礼貌归 Crash with Android 4.1 with ArrayMap #Blackbelt's #答案先生。