当我从 SDK 级别 30 迁移到目标 SDK 31 时,此异常开始发生。我还面临着指向不同库代码的其他链接错误。 Google Ads 似乎与我的库不兼容。我厌倦了在我的测试设备上生成此错误,但崩溃没有发生。
Fatal Exception: java.lang.LinkageError: Method void f.h.b.b.h.a.b03.onPostExecute(java.lang.Object) overrides final method in class Lf/h/b/b/h/a/xz2; (declaration of 'f.h.b.b.h.a.b03' appears in /data/app/~~LknhSvPjgyfVuSPDP0g1mw==/org.contentarcade.apps.logomaker-zoicDfEjevaUR8k79CKfQw==/base.apk!classes2.dex)
at com.google.android.gms.internal.ads.zzfkd.<init>(zzfkd.java:2)
at com.google.android.gms.internal.ads.zzfkd.<clinit>(zzfkd.java:1)
at com.google.android.gms.internal.ads.zzfkd.zzd(zzfkd.java)
at com.google.android.gms.internal.ads.zzfjh.zze(zzfjh.java:3)
at com.google.android.gms.internal.ads.zzfja.zzf(zzfja.java:3)
at com.google.android.gms.internal.ads.zzfip.zze(zzfip.java:1)
at com.google.android.gms.internal.ads.zzeex.zzd(zzeex.java:6)
at com.google.android.gms.internal.ads.zzdnb.zzq(zzdnb.java:26)
at com.google.android.gms.internal.ads.zzdnb.zzh(zzdnb.java:1)
at com.google.android.gms.internal.ads.zzdmv.run(zzdmv.java:2)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.google.android.gms.internal.ads.zzfnu.zza(zzfnu.java:1)
at com.google.android.gms.ads.internal.util.zzf.zza(zzf.java:1)
at com.google.android.gms.internal.ads.zzfnu.dispatchMessage(zzfnu.java:1)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8550)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1139)
我在这里分享我的 gradle 版本和其他依赖项版本。如果有人面临同样的问题,请给出他的建议。
**应用程序级别 Gradle 依赖项 **
dependencies {
def lifecycle_version = "2.2.0"
def firebaseBoom = "30.4.0"
def billingVersion = "5.0.0"
def AdsVesion = "21.2.0" // Upgraded to 21.2.0 due to crashes
def work_RunTime = "2.7.1"
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'junit:junit:4.13.2'
implementation project(':bezier')
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation "com.google.android.gms:play-services-ads:$AdsVesion"
implementation "com.android.billingclient:billing-ktx:$billingVersion"
implementation "androidx.core:core-ktx:1.6.0"
implementation "com.skyfishjy.ripplebackground:library:1.0.1"
//Splash Screen APi for ANdroid 12 and Above
implementation 'androidx.core:core-splashscreen:1.0.0'
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-database'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-config'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
implementation 'org.chromium.net:cronet-embedded:76.3809.111'
implementation 'org.chromium.net:cronet-embedded:76.3809.111'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
//this version support upto 100dps
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.caverock:androidsvg-aar:1.4'
implementation 'com.google.code.gson:gson:2.8.6'
implementation project(path: ':circularrv')
implementation "com.github.skydoves:colorpickerview:2.1.5"
//noinspection GradleCompatible
//noinspection GradleCompatible
implementation 'com.android.support:palette-v7:28.0.0'
implementation project(path: ':eyedropper')
implementation 'com.github.jumadeveloper:networkmanager:0.0.2'
implementation 'com.llollox:androidtoggleswitch:2.0.1'
//drive
implementation 'com.google.android.gms:play-services-auth:20.1.0'
implementation 'com.google.http-client:google-http-client-gson:1.26.0'
implementation('com.google.api-client:google-api-client-android:1.26.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
exclude group: 'org.apache.httpcomponents'
}
// searchModule
// retro fit network call api
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.squareup.okhttp3:okhttp:4.8.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.6.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
//BOm
// Import the BoM for the Firebase platform
implementation platform("com.google.firebase:firebase-bom:$firebaseBoom")
// Declare the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-perf-ktx'
implementation 'com.facebook.shimmer:shimmer:0.5.0'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation "androidx.work:work-runtime:$work_RunTime"
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'}
当我回到 SDK Level 30 时,此异常的发生率减少了。
依赖关系:
implementation 'com.github.jumadeveloper:networkmanager:0.0.2'
不再可访问。
推荐的对我有用的解决方案是下载最新版本,使用 Gradle 组装它,并将其转换为内部库,例如 AAR,例如:
implementation files('libs/AndroidNetworkManager-0.0.2.aar')