Gradle build error Error converting bytecode to dex:Cause: com.android.dex.DexException:Multiple dex files define Landroid/arch/lifecycle/liveData$1

后端 未结 7 1670
轮回少年
轮回少年 2021-01-24 15:23

From last 3 days I\'m getting this error and have tried all i could. Can anyone help me correct it. I\'m using Android 3.0 and my sdk and Google play services are updated as wel

7条回答
  •  日久生厌
    2021-01-24 15:48

    I updated libraries with new version. Need to declare all the android base libraries in the same version(If you update some libraries with new version and using some in older one will cause this kind of exception).

        ext { archLifecycleVersion = '1.1.0'}
    
    dependencies {
    implementation "android.arch.lifecycle:extensions:$rootProject.archLifecycleVersion"
    annotationProcessor "android.arch.lifecycle:compiler:$rootProject.archLifecycleVersion"}
    

提交回复
热议问题