我正在使用firebase在我的应用程序中使用facebook和google登录,并在运行我的代码时收到以下错误。我尝试了stackoverflow上的所有内容来解决这个问题。就像添加packagingoptions一样,包括multidexEnabled为true,删除libs文件夹以及我能得到的任何内容。但这些对我不起作用。
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / auth / api / signin / internal / zzf.class
这是build.gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.ranjit.firebaseauthentication"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled =true
}
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.firebaseui:firebase-ui-auth:0.4.4'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:0)
我不知道为什么,但只是重新启动Android工作室,对我没有任何改变。