[英]Error converting bytecode to dex: Multiple dex files define Landroid/arch/lifecycle/LiveData$LifecycleBoundObserver;
I've been struggling with this error for too long now.我已经为这个错误苦苦挣扎了太久了。 I keep getting this error我不断收到此错误
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid/arch/lifecycle/LiveData$LifecycleBoundObserver;错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义Landroid/arch/lifecycle/LiveData$LifecycleBoundObserver;
Can someone plese help?有人可以帮忙吗? Thanks谢谢
My build.gradle file:我的 build.gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.helpapp_ovi"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:12.0.0'
implementation 'com.google.firebase:firebase-database:12.0.0'
implementation 'com.google.firebase:firebase-core:12.0.0'
implementation 'com.google.firebase:firebase-messaging:12.0.0'
implementation 'com.google.firebase:firebase-crash:12.0.0'
implementation 'com.google.firebase:firebase-storage:12.0.0'
implementation 'com.firebaseui:firebase-ui-database:3.1.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-vector-drawable:28.0.0'
}
apply plugin: 'com.google.gms.google-services'
Hello update your dependencies to latest versions and add this:您好,将您的依赖项更新到最新版本并添加以下内容:
android {
dexOptions {
preDexLibraries = false
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.