Android Studio compile error

Android Studio compile error
0.0 0

#1

Hi, I got multidex error after upgrading to cocos2dx 3.15

So i had to use android studio and now i am compiling from android studio i am getting this error…

Execution failed for task ':Fun:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: retrofit/android/AndroidApacheClient.class

Really stuck with so many errors from past few days…

Please, Please help…


#2

@zhangxm Do you have thoughts?


#3

I haven’t met similar issue. Is there are more than one AndroidApacheClient.java built?


#4

I was thinking that perhaps the path contains more than one class, found someplace in it.


#5

No it has only 1 class…Already checked that…


#6

I think you modify the gradle file right, because AndroidApacheClient.java is not part of engine. Could you please show me what you modified step by step?


#7

I had this issue before when I use SDKBOX, which included twitter SDK into my game. Try to add something like this to gradle:

dependencies { compile(‘com.twitter.sdk.android:twitter:1.13.0@aar’) { transitive = true; exclude module: ‘retrofit’; exclude module: ‘support-v4’ } }