BooksApiJavaWrapper icon indicating copy to clipboard operation
BooksApiJavaWrapper copied to clipboard

Error after adding compile 'com.github.sembozdemir:BooksApiJavaWrapper:1.0.0'

Open testProjects2000 opened this issue 10 years ago • 5 comments

Gradle Duplicate Entry: java.util.zip.ZipException when i run the project after adding com.github.sembozdemir:BooksApiJavaWrapper:1.0.0

testProjects2000 avatar Jan 24 '16 11:01 testProjects2000

Could you give more details, please? I mean the exact stacktrace output?

sembozdemir avatar Jan 24 '16 12:01 sembozdemir

Following error shows up only after adding following line "compile 'com.github.sembozdemir:BooksApiJavaWrapper:1.0.0'"

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/sembozdemir/booksapi/library/BooksApi$1.class

testProjects2000 avatar Jan 24 '16 12:01 testProjects2000

could you please write this code below in Terminal

./gradlew clean

if it does not still work, could you please write this code below in Terminal again and paste the output here?

./gradlew app:dependencies

sembozdemir avatar Jan 24 '16 21:01 sembozdemir

i tried ./gradlew clean but still same error so m pasting output of gradelew app:dependencies C:\Users\lenovo\AndroidStudioProjects\BooksApi>gradlew app:dependencies :app:dependencies


Project :app

_debugAndroidTestApk - ## Internal use, do not manually configure ## --- com.android.support:multidex-instrumentation:1.0.1 --- com.android.support:multidex:1.0.1

_debugAndroidTestCompile - ## Internal use, do not manually configure ## --- com.android.support:multidex-instrumentation:1.0.1 --- com.android.support:multidex:1.0.1

debugApk - ## Internal use, do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:23.1.1 | --- com.android.support:support-v4:23.1.1 | --- com.android.support:support-annotations:23.1.1 +--- project :booksapi-lib
| +--- com.google.code.gson:gson:2.4 | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 | | --- com.squareup.okhttp:okhttp:2.5.0 -> 2.7.0 | | --- com.squareup.okio:okio:1.6.0 | +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 | | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 (
) | | --- com.google.code.gson:gson:2.3.1 -> 2.4 | --- com.squareup.okhttp:okhttp:2.7.0 () +--- com.squareup.picasso:picasso:2.5.2 --- com.github.sembozdemir:BooksApiJavaWrapper:1.0.0 +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 () +--- com.squareup.okhttp:okhttp:2.7.0 (_) +--- com.google.code.gson:gson:2.4 --- com.squareup.retrofit:retrofit:2.0.0-beta2 (*)

debugCompile - ## Internal use, do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:23.1.1 | --- com.android.support:support-v4:23.1.1 | --- com.android.support:support-annotations:23.1.1 +--- project :booksapi-lib
| +--- com.google.code.gson:gson:2.4 | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 | | --- com.squareup.okhttp:okhttp:2.5.0 -> 2.7.0 | | --- com.squareup.okio:okio:1.6.0 | +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 | | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 (
) | | --- com.google.code.gson:gson:2.3.1 -> 2.4 | --- com.squareup.okhttp:okhttp:2.7.0 () +--- com.squareup.picasso:picasso:2.5.2 --- com.github.sembozdemir:BooksApiJavaWrapper:1.0.0 +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 () +--- com.squareup.okhttp:okhttp:2.7.0 (_) +--- com.google.code.gson:gson:2.4 --- com.squareup.retrofit:retrofit:2.0.0-beta2 (*)

_debugUnitTestApk - ## Internal use, do not manually configure ## --- junit:junit:4.12
--- org.hamcrest:hamcrest-core:1.3

_debugUnitTestCompile - ## Internal use, do not manually configure ## --- junit:junit:4.12
--- org.hamcrest:hamcrest-core:1.3

releaseApk - ## Internal use, do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:23.1.1 | --- com.android.support:support-v4:23.1.1 | --- com.android.support:support-annotations:23.1.1 +--- project :booksapi-lib
| +--- com.google.code.gson:gson:2.4 | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 | | --- com.squareup.okhttp:okhttp:2.5.0 -> 2.7.0 | | --- com.squareup.okio:okio:1.6.0 | +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 | | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 (
) | | --- com.google.code.gson:gson:2.3.1 -> 2.4 | --- com.squareup.okhttp:okhttp:2.7.0 () +--- com.squareup.picasso:picasso:2.5.2 --- com.github.sembozdemir:BooksApiJavaWrapper:1.0.0 +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 () +--- com.squareup.okhttp:okhttp:2.7.0 (_) +--- com.google.code.gson:gson:2.4 --- com.squareup.retrofit:retrofit:2.0.0-beta2 (*)

releaseCompile - ## Internal use, do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:23.1.1 | --- com.android.support:support-v4:23.1.1 | --- com.android.support:support-annotations:23.1.1 +--- project :booksapi-lib
| +--- com.google.code.gson:gson:2.4 | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 | | --- com.squareup.okhttp:okhttp:2.5.0 -> 2.7.0 | | --- com.squareup.okio:okio:1.6.0 | +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 | | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 (
) | | --- com.google.code.gson:gson:2.3.1 -> 2.4 | --- com.squareup.okhttp:okhttp:2.7.0 () +--- com.squareup.picasso:picasso:2.5.2 --- com.github.sembozdemir:BooksApiJavaWrapper:1.0.0 +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 () +--- com.squareup.okhttp:okhttp:2.7.0 (_) +--- com.google.code.gson:gson:2.4 --- com.squareup.retrofit:retrofit:2.0.0-beta2 (*)

_releaseUnitTestApk - ## Internal use, do not manually configure ## --- junit:junit:4.12
--- org.hamcrest:hamcrest-core:1.3

_releaseUnitTestCompile - ## Internal use, do not manually configure ## --- junit:junit:4.12
--- org.hamcrest:hamcrest-core:1.3

androidJacocoAgent - The Jacoco agent to use to get coverage data. Download https://jcenter.bintray.com/org/jacoco/org.jacoco.agent/0.7.4.201502262128/org .jacoco.agent-0.7.4.201502262128.pom --- org.jacoco:org.jacoco.agent:0.7.4.201502262128

androidJacocoAnt - The Jacoco ant tasks to use to get execute Gradle tasks. Download https://jcenter.bintray.com/org/jacoco/org.jacoco.ant/0.7.4.201502262128/org.j acoco.ant-0.7.4.201502262128.pom Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.4.201502262128/or g.jacoco.report-0.7.4.201502262128.pom --- org.jacoco:org.jacoco.ant:0.7.4.201502262128
+--- org.jacoco:org.jacoco.core:0.7.4.201502262128 | --- org.ow2.asm:asm-debug-all:5.0.1 +--- org.jacoco:org.jacoco.report:0.7.4.201502262128 | +--- org.jacoco:org.jacoco.core:0.7.4.201502262128 (*) | --- org.ow2.asm:asm-debug-all:5.0.1 --- org.jacoco:org.jacoco.agent:0.7.4.201502262128

androidTestApk - Classpath packaged with the compiled 'androidTest' classes. No dependencies

androidTestCompile - Classpath for compiling the androidTest sources. No dependencies

androidTestProvided - Classpath for only compiling the androidTest sources. No dependencies

androidTestWearApp - Link to a wear app to embed for object 'androidTest'. No dependencies

apk - Classpath packaged with the compiled 'main' classes. No dependencies

archives - Configuration for archive artifacts. No dependencies

compile - Classpath for compiling the main sources. +--- com.android.support:appcompat-v7:23.1.1
| --- com.android.support:support-v4:23.1.1 | --- com.android.support:support-annotations:23.1.1 +--- project :booksapi-lib
| +--- com.google.code.gson:gson:2.4 | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 | | --- com.squareup.okhttp:okhttp:2.5.0 -> 2.7.0 | | --- com.squareup.okio:okio:1.6.0 | +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 | | +--- com.squareup.retrofit:retrofit:2.0.0-beta2 () | | --- com.google.code.gson:gson:2.3.1 -> 2.4 | --- com.squareup.okhttp:okhttp:2.7.0 () +--- com.squareup.picasso:picasso:2.5.2 --- com.github.sembozdemir:BooksApiJavaWrapper:1.0.0 +--- com.squareup.retrofit:converter-gson:2.0.0-beta2 () +--- com.squareup.okhttp:okhttp:2.7.0 () +--- com.google.code.gson:gson:2.4 --- com.squareup.retrofit:retrofit:2.0.0-beta2 (*)

debugApk - Classpath packaged with the compiled 'debug' classes. No dependencies

debugCompile - Classpath for compiling the debug sources. No dependencies

debugProvided - Classpath for only compiling the debug sources. No dependencies

debugWearApp - Link to a wear app to embed for object 'debug'. No dependencies

default - Configuration for default artifacts. No dependencies

default-mapping - Configuration for default mapping artifacts. No dependencies

default-metadata - Metadata for the produced APKs. No dependencies

provided - Classpath for only compiling the main sources. No dependencies

releaseApk - Classpath packaged with the compiled 'release' classes. No dependencies

releaseCompile - Classpath for compiling the release sources. No dependencies

releaseProvided - Classpath for only compiling the release sources. No dependencies

releaseWearApp - Link to a wear app to embed for object 'release'. No dependencies

testApk - Classpath packaged with the compiled 'test' classes. No dependencies

testCompile - Classpath for compiling the test sources. --- junit:junit:4.12
--- org.hamcrest:hamcrest-core:1.3

testDebugApk - Classpath packaged with the compiled 'testDebug' classes. No dependencies

testDebugCompile - Classpath for compiling the testDebug sources. No dependencies

testDebugProvided - Classpath for only compiling the testDebug sources. No dependencies

testDebugWearApp - Link to a wear app to embed for object 'testDebug'. No dependencies

testProvided - Classpath for only compiling the test sources. No dependencies

testReleaseApk - Classpath packaged with the compiled 'testRelease' classes. No dependencies

testReleaseCompile - Classpath for compiling the testRelease sources. No dependencies

testReleaseProvided - Classpath for only compiling the testRelease sources. No dependencies

testReleaseWearApp - Link to a wear app to embed for object 'testRelease'. No dependencies

testWearApp - Link to a wear app to embed for object 'test'. No dependencies

wearApp - Link to a wear app to embed for object 'main'. No dependencies

BUILD SUCCESSFUL

Total time: 37.514 secs C:\Users\lenovo\AndroidStudioProjects\BooksApi>

testProjects2000 avatar Jan 25 '16 16:01 testProjects2000

if you add gson or okhttp or retrofit library to your app:build.gradle, could you try delete them? because they are already added in BooksApi library.

sembozdemir avatar Jan 27 '16 23:01 sembozdemir