gradle - Android transform classes with dex for debug -
i run firebase database , have error. have apply plugin: 'com.google.gms.google-services', error. did not error when first ran program error
my error:
error:execution failed 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/common/api/zza;
build.gradle
apply plugin: 'com.android.application' android { compilesdkversion 26 buildtoolsversion "26.0.1" defaultconfig { applicationid "com.yavuzoktay.foodapp" minsdkversion 19 targetsdkversion 26 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' }) //add library compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.google.firebase:firebase-core:9.0.0' compile 'com.google.firebase:firebase-database:9.0.0' compile 'info.hoang8f:fbutton:1.0.5' compile 'com.rengwuxian.materialedittext:library:2.1.4' compile 'com.android.support:cardview-v7:26.+' compile 'com.android.support:recyclerview-v7:26.+' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.firebaseui:firebase-ui-database:1.2.0' compile 'com.android.support:design:26.+' testcompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services'
your advice important me
thank !
you using different versions of same libraries:
compile 'com.google.firebase:firebase-core:9.0.0' compile 'com.google.firebase:firebase-database:9.0.0' compile 'com.firebaseui:firebase-ui-database:1.2.0'
as can read here there dependency between firebaseui , firebase libraries:
firebaseui version firebase/play services version 2.3.0 11.0.4 2.2.0 11.0.4 2.1.1 11.0.2 2.0.1 11.0.1 ..... ..... 1.2.0 10.2.0
use same version avoid these issue.
Comments
Post a Comment