I installed retrofit2 in Android Project using following gradle lines;
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
In the first attempt, the following error is occurred.
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
After that, I added following line under defaultConfig
multiDexEnabled true
As a result of this, the following error is occured.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/gson/annotations/Expose.class
Finally, I tried this (Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug') solution, but the result is same.
How can I solve this problem?