Firebase chat adding to a project causes error in gradle built.

225 views
Skip to first unread message

sachinvarma.mo...@gmail.com

unread,
Jul 8, 2016, 10:29:57 AM7/8/16
to Firebase Google Group
hai friends,

iam new to firebase and i was not able to implement my firebase chat project to my another project.
the error showing is:

"Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/fasterxml/jackson/core/base/GeneratorBase.class"

my build.gradle is:

apply plugin: 'com.android.application'
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.sac.comp.sac"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true


}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:23.4.0'
testCompile 'junit:junit:4.12'
compile 'com.wdullaer:materialdatetimepicker:2.1.1'
compile 'com.github.clans:fab:1.6.2'
compile files('libs/universal-image-loader-1.9.0.jar')
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile files('libs/jackson-core-2.5.4.jar')
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.prolificinteractive:material-calendarview:1.3.0'
compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-auth:9.2.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'

compile 'com.google.firebase:firebase-database:9.2.0'
compile 'com.google.firebase:firebase-auth:9.2.0'
compile 'com.google.firebase:firebase-config:9.2.0'
compile 'com.google.android.gms:play-services-appinvite:9.2.0'
compile 'com.google.firebase:firebase-messaging:9.2.0'
compile 'com.google.android.gms:play-services-ads:9.2.0'
compile 'com.google.firebase:firebase-crash:9.2.0'
compile 'com.google.firebase:firebase-analytics:9.2.0'
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebase:firebase-client-android:2.5.2'
}
apply plugin: 'com.google.gms.google-services'

pls help...
thanks in advance.

Samuel Stern

unread,
Jul 8, 2016, 11:54:43 AM7/8/16
to Firebase Google Group
HI there,

There are a few problematic lines I can see right away:
    compile 'com.google.firebase:firebase-database:9.2.0'
    // ...
    compile 'com.firebaseui:firebase-ui-database:0.4.0'
    compile 'com.firebase:firebase-client-android:2.5.2'

First of all you are including both `firebase-database` and `firebase-client-android`.  You should only be including `firebase-database` if you intend to use the new Firebase products and access your database with the DatabaseReference class rather than the Firebase class.

Second, you should update your version of firebase-ui-database to 0.4.2, because that will avoid any dependency conflicts with firebase-database:9.2.0.

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1e24f0e4-0525-4e1d-b629-b0ac6aa6b4af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages