【发布时间】:2018-03-01 14:14:13
【问题描述】:
我可以在设备上以调试模式运行我的应用程序,没有问题,但是如果我想生成签名的 apk,它会给出这个错误
错误:任务 ':app:transformDexWithDexForRelease' 执行失败。
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException:com.android.dex.DexException: 多个dex文件定义Landroid/arch/lifecycle/LiveData$1;
什么是“LiveData.class”其实我不明白
这是我的依赖:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//arayüz
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:palette-v7:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
//firebase
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.firebaseui:firebase-ui-storage:3.2.1'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-config:11.8.0'
implementation 'com.firebaseui:firebase-ui-database:3.0.0'
//metariel View Pager
implementation 'com.github.florent37:materialviewpager:1.2.3'
//Glide
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
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'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
标签: java android android-gradle-plugin apk