gpt4 book ai didi

android - 仅支持 kitkat 设备中的 v4 arraymap 崩溃

转载 作者:行者123 更新时间:2023-11-29 20:12:39 25 4
gpt4 key购买 nike

Android 应用崩溃并出现错误类 def 未找到:仅在 kitkat 设备中支持 v4 arraymap。

Gradle 依赖:

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;
}

日志猫:

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)

最佳答案

你得到

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)

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

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

致谢 Crash with Android 4.1 with ArrayMap #Blackbelt 的先生的回答。

关于android - 仅支持 kitkat 设备中的 v4 arraymap 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34544781/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com