gpt4 book ai didi

android - 我的应用程序在启动时崩溃(java.lang.RuntimeException : Unable to get provider)

转载 作者:行者123 更新时间:2023-11-29 23:52:07 25 4
gpt4 key购买 nike

我的应用程序从上周开始运行良好,但今天它在启动时因相同的代码而崩溃。我没有从上周更改代码。我不知道为什么会这样。请尽快帮助我。

LogCat 错误

06-11 00:53:19.400 9515-9515/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jaffteach.medicare, PID: 9515
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/base.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_0_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_1_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_2_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_3_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_4_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_5_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_6_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_7_apk.apk", zip file "/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/split_lib_slice_8_apk.apk"],nativeLibraryDirectories=[/data/app/com.jaffteach.medicare-yxLqDL7JptwmV2rJYJClrA==/lib/x86, /system/lib, /vendor/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:6288)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5851)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5772)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Gradle :应用

我的gradle是

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.jaffteach.medicare"
minSdkVersion 20
targetSdkVersion 26
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}
subprojects {
afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 26 buildToolsVersion '26.0.2'
}
}
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.0'
}
}
}
}

请告诉我这个问题的最佳解决方案。

最佳答案

最后我搜索了很多,现在对我有用的解决方案是

just disable Instant Run

用于禁用即时运行

简单的去

  1. Settings

  2. Build, Execution, Deployment

  3. Instant Run

  4. and Unchecked Enable Instant Run

关于android - 我的应用程序在启动时崩溃(java.lang.RuntimeException : Unable to get provider),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50787812/

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