FATAL EXCEPTION: main Process: com.delegates.predelegatesapprider, PID: 8258 java.lang.NoClassDefFoundError:

Viewed 40

Getting an error. don't know where is the problem

Error is: FATAL EXCEPTION: main Process: com.delegates.predelegatesapprider, PID: 8258 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/installations/FirebaseInstallationsApi;

was doing the coding for uploading avatar image or profile image.

this is my gradle file

plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
}

android {
    compileSdkVersion 29
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.delegates.predelegatesapprider"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.firebase:firebase-auth:19.3.1'
    implementation 'com.google.firebase:firebase-database:19.5.1'
    implementation 'androidx.navigation:navigation-fragment:2.3.1'
    implementation 'androidx.navigation:navigation-ui:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//FirebaseUI
    implementation 'com.firebaseui:firebase-ui-auth:6.2.1'

//RxJava
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.9'

//Material
    implementation 'com.google.android.material:material:1.1.0'

//ButterKnife
    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

//Dexter
    implementation 'com.karumi:dexter:6.1.2'

//Location
    implementation 'com.google.android.gms:play-services-location:17.0.0'

//Circle Image
    implementation 'de.hdodenhof:circleimageview:3.1.0'

//Firebase Storage
    implementation 'com.google.firebase:firebase-storage:19.1.1'

//Glide
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

    implementation 'com.google.firebase:firebase-iid:21.0.0@aar'

}
2 Answers

Try to replace the firebase-iid dependency with:

implementation 'com.google.firebase:firebase-iid:21.0.0'
Related