Мое приложение работало нормально с прошлой недели, но сегодня оно зависало при запуске с тем же кодом.Я не был изменен код с прошлой недели.Я не знаю, почему это произошло.Пожалуйста, помогите мне в ближайшее время.
Ошибка 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: app
Мой 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'
}
}
}
}
Скажите, пожалуйста, лучшее решение этой проблемы.