java - Gradle duplicate entries : build failed -
i running issue everytime when add new module app time not able resolve @ all. sick , tired of not friendly messages , tools of gradle. please help: if need dependencies output let me know - it's big :(
error: :app:transformclasseswithjarmergingfordebug failed failure: build failed exception. * went wrong: execution failed task ':app:transformclasseswithjarmergingfordebug'. com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: com/google/appengine/tools/appstats/inter nalprotos$1.class
here 4 gradle files:
top level gradle:
buildscript { repositories { jcenter() mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1' classpath 'com.google.gms:google-services:1.5.0-beta2' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() mavencentral() } } app gradle:
apply plugin: 'com.android.application' apply plugin: 'hugo' android { compilesdkversion 23 buildtoolsversion "23.0.1" defaultconfig { applicationid "com.app.myapp" minsdkversion 15 targetsdkversion 23 versioncode 1 multidexenabled true versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } compileoptions { sourcecompatibility javaversion.version_1_7 targetcompatibility javaversion.version_1_7 } } apply plugin: 'com.google.gms.google-services' dependencies { compile filetree(include: ['*.jar'], dir: 'libs') compile files('libs/nineoldandroids-2.4.0.jar') compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.google.android.gms:play-services:8.3.0' compile 'com.android.support:cardview-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile 'com.android.support:gridlayout-v7:23.1.1' compile 'com.android.support:mediarouter-v7:23.1.1' compile 'com.android.support:palette-v7:23.1.1' compile 'com.android.support:recyclerview-v7:23.1.1' compile 'com.android.support:support-v13:23.1.1' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.mikhaellopez:circularimageview:2.1.1' compile 'com.cocosw:bottomsheet:0.+@aar' compile 'com.github.bumptech.glide:okhttp-integration:1.3.1' compile 'com.google.android.gms:play-services-auth:8.3.0' compile 'com.google.android.gms:play-services-gcm:8.3.0' compile project(path: ':backend', configuration: 'android-endpoints') compile project(path: ':commons') } backend gradle:
buildscript { repositories { jcenter() } dependencies { classpath 'com.google.appengine:gradle-appengine-plugin:1.9.18' } } repositories { jcenter(); } apply plugin: 'java' apply plugin: 'war' apply plugin: 'appengine' sourcecompatibility = javaversion.version_1_7 targetcompatibility = javaversion.version_1_7 dependencies { appenginesdk 'com.google.appengine:appengine-java-sdk:1.9.18' compile 'com.google.appengine:appengine-endpoints:1.9.18' compile 'com.google.appengine:appengine-endpoints-deps:1.9.18' compile 'javax.servlet:servlet-api:2.5' compile 'com.ganyo:gcm-server:1.0.2' compile project(path: ':commons') } appengine { downloadsdk = true appcfg { oauth2 = true } endpoints { getclientlibsonbuild = true getdiscoverydocsonbuild = true } } commons gradle:
apply plugin: 'java' dependencies { compile 'com.googlecode.objectify:objectify:4.0b3' compile 'com.google.code.gson:gson:2.5' }
you can try
compile 'com.android.support:multidex:1.0.1' it might you.
Comments
Post a Comment