Reputation: 1804
I've use Kryo libs and it's pretty good. However, when I want to create a signed APK, it keeps failing to build because of the error:
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
java.io.IOException: Can't write [C:\AndroidProjects\App\app\build\intermediates\transforms\proguard\release\jars\3\1f\main.jar] (Can't read [C:\AndroidProjects\App\app\importLibs\minlog-1.3.0.jar(;;;;;;**.class)] (Duplicate zip entry [minlog-1.3.0.jar:com/esotericsoftware/minlog/Log$Logger.class]))
build gradle (module app)
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.android.support:design:24.1.1'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile files('importLibs/kryo-2.23.0.jar')
compile files('importLibs/minlog-1.3.0.jar')
compile files('importLibs/objenesis-2.1.jar')
compile files('importLibs/reflectasm-1.10.1-shaded.jar')
}
proguard file
proguard-rules.pro
-dontwarn com.esotericsoftware.**
-dontwarn org.objenesis.**
-keep class com.esotericsoftware.**{*;}
What exactly do I need to write to make it work?
Upvotes: 1
Views: 171
Reputation: 6839
There can be case where a library is part of another library that you have imported in your project Check the lib dependency tree using following command For Android, use this line
gradle app:dependencies
or if you have a gradle wrapper:
./gradlew app:dependencies
Or else there is a less popular Android studio plugin called GradleView that can give you entire lib tree used in your application and also where it might be clashing with some other library.
Upvotes: 1
Reputation: 1181
I had similar problem, and I solved it with just including retrofit
:
'com.squareup.retrofit:retrofit:1.9.0'
I hope it will help you too.
Upvotes: 0