自从添加 metaAudience Network中介适配器以来,我在Android 10设备上遇到的崩溃显著增加,这些崩溃仅在Google Play控制台中报告,而不在Firebase Crashlytics中报告,有人对如何解决此问题有任何建议吗?
同样,还报告了以下崩溃。[libart.so] artQuickToInterpreterBridge
堆栈跟踪
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 27202 >>> com.company.name <<<
backtrace:
#00 pc 0x000000000053fe18 /apex/com.android.runtime/lib64/libart.so (art::verifier::impl::(anonymous namespace)::MethodVerifier<false>::GetMethodReturnType()+92)
#01 pc 0x000000000054c9b4 /apex/com.android.runtime/lib64/libart.so (art::verifier::impl::(anonymous namespace)::MethodVerifier<false>::CodeFlowVerifyInstruction(unsigned int*)+13732)
#02 pc 0x000000000052fd20 /apex/com.android.runtime/lib64/libart.so (_ZN3art8verifier4impl12_GLOBAL__N_114MethodVerifierILb0EE6VerifyEv$09bf97eb2c0d684adb6d215f7005036e+14328)
#03 pc 0x000000000052b8c4 /apex/com.android.runtime/lib64/libart.so (art::verifier::MethodVerifier::FailureData art::verifier::MethodVerifier::VerifyMethod<false>(art::Thread*, unsigned int, art::DexFile const*, art::Handle<art::mirror::DexCache>, art::DexFile const*<art::Handle::ClassLoader>, art::dex::ClassDef const&, art::DexFile const*<art::Handle::ClassLoader>::CodeItem const*, art::ArtMethod*, unsigned int, art::CompilerCallbacks*, bool, art::verifier::HardFailLogMode, bool, unsigned int, std::__1::basic_string<char, art::verifier::HardFailLogMode::char_traits<char>, art::verifier::HardFailLogMode::allocator<char>>*)+260)
#04 pc 0x0000000000529cc0 /apex/com.android.runtime/lib64/libart.so (art::verifier::ClassVerifier::VerifyClass(art::Thread*, art::DexFile const*, art::Handle<art::mirror::DexCache>, art::Handle<art::mirror::ClassLoader>, art::dex::ClassDef const&, art::CompilerCallbacks*, bool, art::verifier::HardFailLogMode, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)+1316)
#05 pc 0x000000000052955c /apex/com.android.runtime/lib64/libart.so (art::verifier::ClassVerifier::VerifyClass(art::Thread*, art::ObjPtr<art::mirror::Class>, art::CompilerCallbacks*, bool, art::verifier::HardFailLogMode, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)+492)
#06 pc 0x0000000000192890 /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::VerifyClass(art::Thread*, art::Handle<art::mirror::Class>, art::verifier::HardFailLogMode)+1460)
#07 pc 0x00000000001958bc /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::InitializeClass(art::Thread*, art::Handle<art::mirror::Class>, bool, bool)+356)
#08 pc 0x0000000000180b8c /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::EnsureInitialized(art::Thread*, art::Handle<art::mirror::Class>, bool, bool)+92)
#09 pc 0x000000000030adcc /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+532)
#10 pc 0x0000000000305f98 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892)
#11 pc 0x00000000005aa104 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+372)
#12 pc 0x0000000000131994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20)
#13 pc 0x000000000017e75a /data/data/com.company.name/files/audience_network.dex (com.facebook.ads.redexgen.X.89.A0E+126)
#14 pc 0x00000000005aa3a0 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040)
#15 pc 0x0000000000131994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20)
#16 pc 0x000000000017e60e /data/data/com.company.name/files/audience_network.dex (com.facebook.ads.redexgen.X.89.A09+14)
#17 pc 0x00000000002dc030 /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1012465689697948481)+240)
#18 pc 0x0000000000598cc4 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032)
#19 pc 0x0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
#20 pc 0x00000000001375b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568)
#21 pc 0x0000000000169c78 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276)
#22 pc 0x000000000030ad38 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384)
#23 pc 0x0000000000305f98 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892)
#24 pc 0x00000000005aa104 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+372)
#25 pc 0x0000000000131994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20)
#26 pc 0x0000000000166b00 /data/data/com.company.name/files/audience_network.dex (com.facebook.ads.redexgen.X.5H.onContentProviderCreated+8)
#27 pc 0x00000000005a9110 /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788)
#28 pc 0x0000000000131a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20)
#29 pc 0x00000000001664b4 /data/data/com.company.name/files/audience_network.dex (com.facebook.ads.redexgen.X.5C.onContentProviderCreated+32)
#30 pc 0x00000000002dc030 /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1012465689697948481)+240)
#31 pc 0x0000000000598cc4 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032)
#32 pc 0x0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
#33 pc 0x00000000001a5590 /data/app/com.company.name-91DFwkqJ07GS7tkv8moMSA==/oat/arm64/base.odex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory.doCallInitialize+464)
#34 pc 0x00000000001a51a4 /data/app/com.company.name-91DFwkqJ07GS7tkv8moMSA==/oat/arm64/base.odex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory$a.run+980)
#35 pc 0x00000000001a51d8 /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
#36 pc 0x0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
#37 pc 0x0000000000169c58 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
#38 pc 0x00000000004b74d0 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#39 pc 0x00000000004b85e4 /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
#40 pc 0x00000000004f91b8 /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176)
#41 pc 0x00000000000d4358 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
#42 pc 0x0000000000071aa8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
生成分级
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'kotlin-parcelize'
id 'com.google.gms.google-services' // Required for Firebase
id 'com.google.firebase.crashlytics' // Crashlytics
}
android {
compileSdkVersion 33
defaultConfig {
applicationId "com.company.name"
minSdkVersion 19
targetSdkVersion 33
versionCode 43
versionName "4.3"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
zipAlignEnabled true
}
debug {
minifyEnabled false
firebaseCrashlytics {
mappingFileUploadEnabled false
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
bundle {
language {
enableSplit = false //Keep All Strings in AAB file
}
}
configurations {
all*.exclude group: 'com.google.firebase', module: 'firebase-core'
}
buildFeatures {
viewBinding = true
}
namespace 'com.company'
}
dependencies {
// Defaults
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(path: ':library')
testImplementation 'junit:junit:4.13.2'
annotationProcessor 'androidx.annotation:annotation:1.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.browser:browser:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
// Kotlin
implementation "androidx.core:core-ktx:1.9.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10"
// Firebase
implementation platform('com.google.firebase:firebase-bom:31.1.1') // BoM
implementation 'com.google.firebase:firebase-perf-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx' // Crashlytics
implementation 'com.google.firebase:firebase-analytics' // Analytics
// AdMob
implementation 'com.google.android.gms:play-services-ads:21.4.0'
implementation 'com.google.android.ads.consent:consent-library:1.0.8'
// Meta Audience Network
implementation 'com.facebook.android:audience-network-sdk:6.12.0'
implementation 'com.google.ads.mediation:facebook:6.12.0.0'
// Multidex
implementation 'androidx.multidex:multidex:2.0.1'
// Play Services
implementation "com.google.android.gms:play-services-gcm:17.0.0"
// Glide
implementation 'com.github.bumptech.glide:glide:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
// Timber
implementation 'com.jakewharton.timber:timber:4.7.1'
// Work Manager
implementation 'androidx.work:work-runtime:2.7.1'
// Material Dialogs
implementation 'com.afollestad.material-dialogs:core:3.3.0'
implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
// Commons Text
implementation 'org.apache.commons:commons-lang3:3.11'
// Dagger Hilt
implementation 'com.google.dagger:hilt-android:2.42'
kapt 'com.google.dagger:hilt-compiler:2.42'
kapt 'androidx.hilt:hilt-compiler:1.0.0'
// Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
// DataStore
implementation "androidx.datastore:datastore-preferences:1.0.0"
// LiveData
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
// Fragment
implementation 'androidx.fragment:fragment-ktx:1.5.5'
// Lingver
implementation "com.github.YarikSOffice:lingver:1.3.0"
}
1条答案
按热度按时间k97glaaz1#
我遇到过同样的问题,原因是广告sdk被多个进程初始化,解决办法是只在主进程中初始化广告sdk。