My app crash on Startup (java.lang.RuntimeException: Unable to get provider)

Ahsan Sherazi 06/10/2018. 1 answers, 39 views
android android crash android-multidex

Permohonan saya berjalan lancar dari minggu lepas tetapi hari ini telah terhempas pada permulaan dengan kod yang sama. Saya tidak menukar kod dari minggu lepas. Saya tidak tahu mengapa ini berlaku. Tolong bantu saya tidak lama lagi.

LogCat Error

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

Gradaku adalah

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'
            }
        }
    }
} 

Sila beritahu saya penyelesaian terbaik masalah ini.

1 Answers


Ahsan Sherazi 06/18/2018.

Finally saya mencari banyak dan sekarang penyelesaian yang bekerja untuk saya adalah

just disable Instant Run

For Disable Instant Run

Mudah pergi ke

  1. Tetapan

  2. Membina, Pelaksanaan, Penyebaran

  3. Jalankan Segera

  4. dan Unchecked Enable Run Instant

Related questions

Hot questions

Language

Popular Tags