gpt4 book ai didi

android - java.lang.NoClassDefFoundError : Failed resolution of: Lio/fabric/sdk/android/services/common/FirebaseInfo; 错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:26:18 26 4
gpt4 key购买 nike

尝试在 Lollipop 中运行我的应用程序时遇到问题,日志如下:

11-08 15:12:35.816 987-987/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.rocketjourney, PID: 987
java.lang.NoClassDefFoundError: Failed resolution of: Lio/fabric/sdk/android/services/common/FirebaseInfo;
at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:22)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1696)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1671)
at android.app.ActivityThread.installProvider(ActivityThread.java:4999)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4594)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4534)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.fabric.sdk.android.services.common.FirebaseInfo" on path: DexPathList[[zip file "/data/app/com.rocketjourney-2/base.apk"],nativeLibraryDirectories=[/data/app/com.rocketjourney-2/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

我的毕业典礼:

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.21.6'
}
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
apply plugin: 'me.tatarka.retrolambda'

android {
compileSdkVersion 25
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.rocketjourney"
minSdkVersion 21
targetSdkVersion 24
versionCode 67
versionName "4.4"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "com.rocketjourney.helpers.CustomTestRunner"
}

buildTypes {

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

dexOptions {
incremental true
javaMaxHeapSize "4g"
jumboMode = true
}

dependencies {
compile 'com.android.support:multidex:1.0.1'
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true
exclude group: 'com.android.support', module: 'support-annotations'
}
...

我在启动 Activity 中有这个:

@Override
public void onCreate(Bundle savedInstanceState) {
MultiDex.install(this);
super.onCreate(savedInstanceState);

当我试图解决这个问题时,出现了multiDex的问题,所以我不知道出现这个问题的主要原因是什么,因为我尝试了很多解决方案但我没有运气。感谢您的帮助。

最佳答案

在您的 Android Studio 终端中输入 rm -rf .gradle 然后重试。这帮我解决了!

关于android - java.lang.NoClassDefFoundError : Failed resolution of: Lio/fabric/sdk/android/services/common/FirebaseInfo; 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47190929/

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