I'm having a hard time trying to build a signed apk of my app, but I have an error related with google/android/gms class. Do you have idea of what the problem could be?
One more thing, I get this error only when I try to generate the signed apk, but in develop mode it runs fine in my smartphone. (I want to generate my app so anyone can install it on their phone)
I googled it and I know is related to gms version, but I can't identify exactly where in the code is the incompatibility of dependencies.
This is the gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.test_app.myfinalapp"
minSdkVersion 19
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'
}
}
}
android {
useLibrary 'org.apache.http.legacy'
}
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.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.firebaseui:firebase-ui-auth:2.0.1'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.loopj.android:android-async-http:1.4.9'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
And this is the error:
Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzaso.class