Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.1 Error while Compile

Tags:

android

Just updated to Android Studio 3.1 and i am getting this error while i compile and run my app it crushes not even it launch. I don't know how to fix this before the update everything was working smooth. And now this weird error help me guys.

HERE IS THE ERROR MESSAGE THAT I GET.

 Process: gmlab.shotonlogo, PID: 10917
    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/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/base.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_dependencies_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_resources_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_0_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_1_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_2_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_3_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_4_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_5_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_6_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_7_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_8_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/lib/arm64, /system/lib64, /vendor/lib64]]
        at android.app.ActivityThread.installProvider(ActivityThread.java:6242)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)
        at android.app.ActivityThread.-wrap1(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/base.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_dependencies_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_resources_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_0_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_1_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_2_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_3_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_4_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_5_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_6_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_7_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_8_apk.apk", zip file "/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/lib/arm64, /system/lib64, /vendor/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6227)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722) 
        at android.app.ActivityThread.-wrap1(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.app.ActivityThread.main(ActivityThread.java:6494) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
03-27 13:55:57.256 10917-10917/? E/AndroidRuntime:  Suppressed: java.io.IOException: No original dex files found for dex location /data/app/gmlab.shotonlogo-kgXVXTIWrCf-_Y9hAwZoWQ==/split_lib_resources_apk.apk
        at dalvik.system.DexFile.openDexFileNative(Native Method)
        at dalvik.system.DexFile.openDexFile(DexFile.java:353)
        at dalvik.system.DexFile.<init>(DexFile.java:100)
        at dalvik.system.DexFile.<init>(DexFile.java:74)
        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
        at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
        at dalvik.system.DexPathList.<init>(DexPathList.java:157)
        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
        at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:35)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:693)
        at android.app.LoadedApk.getClassLoader(LoadedApk.java:727)
        at android.app.LoadedApk.getResources(LoadedApk.java:954)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2270)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5639)

HERE IS THE BUILD CONFIG FOR MY PROJECT

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "gmlab.shotonlogo"
        minSdkVersion 17
        targetSdkVersion 27
        versionCode 50
        versionName "4.6"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            debuggable false
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    implementation 'agency.tango.android:material-intro-screen:0.0.5'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-ads:12.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:design:27.1.0'

}



apply plugin: 'com.google.gms.google-services'

PROJECT LEVEL GRADLE

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
like image 737
Murtaza Avatar asked Mar 27 '18 09:03

Murtaza


1 Answers

Hey i just disable the INSTANT RUN and my app is working fine now. IDK What they did with Android Studio 3.1. Thank you all for your replies :)

like image 156
Murtaza Avatar answered Nov 12 '22 11:11

Murtaza