多个dex文件定义Lcom / google / android / gms / auth / api / signin / internal / zzf; [英] Multiple dex files define Lcom/google/android/gms/auth/api/signin/internal/zzf;
问题描述
错误:
> com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:com.android.dex.DexException:多个dex文件定义Lcom / google / android /克/ AUTH / API /登入/内部/ ZZF;
我将这两个依赖关系添加到一起时出现此错误: p>
编译'com.google.firebase:firebase-auth:10.0.1'
compile'com.firebaseui:firebase-ui:0.6.0'
app build.gradle
apply plugin:'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion25.0.2强调文本
defaultConfig {
applicationIdcom.techstrategies.icall
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName1.0
testInstrumentationRunnerandroid.support.test.runner.AndroidJUnitRunner
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard- rules.pro'
}
}
依赖项{
编译fileTree(dir:'libs',include:['* .jar'] )
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
exclude group:'com.android.support',module:'support-annotations'
})
compile'com.android.support:appcompat-v7:25.0.1'
compile'com.google.firebase:firebase-messaging:10.0.1'
编译'com.google.firebase:firebase-core:10.0.1'
编译'com.google.firebase:firebase-auth:10.0.1'
编译'com.firebaseui:firebase-ui: 0.6.0'
testCompile'junit:junit:4.12'
}
apply plugin:'com.google.gms .google-services'
检查官方文档
您正在使用错误的版本sion 。
FirebaseUI版本 - > Firebase / Play服务版本
1.1.1 - > 10.0.0或10.0.1
1.0.1 - > 10.0.0或10.0.1
1.0.0 - > 9.8.0
0.6.2 - > 9.8.0
0.6.1 - > 9.6.1
0.6.0 - > 9.6.0
由于您使用的是
compile'com.google.firebase:firebase-core:10.0.1'
您必须使用:
compile'com.firebaseui:firebase-ui:1.1.1'
或
编译'com.firebaseui:firebase-ui:1.0.1'
编辑: 检查文档和这个问题。 Error I get this error when i add these two dependencies together: compile 'com.google.firebase:firebase-auth:10.0.1' compile 'com.firebaseui:firebase-ui:0.6.0' app build.gradle
Check the official doc. Since you are using you have to use: or EDIT: Check the doc and this issue. 这篇关于多个dex文件定义Lcom / google / android / gms / auth / api / signin / internal / zzf;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
另外,由于您正在添加
allprojects {
版本库{
// ...
maven {url'https://maven.fabric.io/public'}
}
}
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/auth/api/signin/internal/zzf;
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"emphasized text
defaultConfig {
applicationId "com.techstrategies.icall"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.firebaseui:firebase-ui:0.6.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You are using the wrong version.FirebaseUI Version -> Firebase/Play Services Version
1.1.1 --> 10.0.0 or 10.0.1
1.0.1 --> 10.0.0 or 10.0.1
1.0.0 --> 9.8.0
0.6.2 --> 9.8.0
0.6.1 --> 9.6.1
0.6.0 --> 9.6.0
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.firebaseui:firebase-ui:1.1.1'
compile 'com.firebaseui:firebase-ui:1.0.1'
Also since you are adding the Firebase-UI Auth library you have to add this repository:allprojects {
repositories {
// ...
maven { url 'https://maven.fabric.io/public' }
}
}