java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap

前端 未结 3 1201
谎友^
谎友^ 2021-01-21 02:23

My app works perfectly when you run it on API 23 - 25, but on API 21 & 22 it crashes with the following error:

12-12 15:01:18.436 2         


        
3条回答
  •  日久生厌
    2021-01-21 02:30

    I was having this same issue and solved it by adding these dependencies to the android/app/build.gradle file:

    dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
        implementation 'com.google.firebase:firebase-analytics:17.2.0'
        // I had to add the following to fix this error.
        implementation 'com.google.firebase:firebase-auth:19.0.0'
        implementation 'com.google.firebase:firebase-firestore:21.1.1'
    }
    

提交回复
热议问题