@nite @yinjimmy
Hi, we updated sdkbox to latest version and seems there is some issue with google play services when enabling multidex.
We getting issue about duplicated entry com/google/android/gms/internal/zzcfo.class
After rollbacking gps version to previos sdkbox version everything compiled, is there some special requirments to use latest sdkbox bundled gps in project?
I am also having similar issues with latest (cocos 3.17 and latest sdkbox) with the facebook plugin.
:MyApp:transformClassesWithDexBuilderForDebug
:MyApp:transformClassesWithMultidexlistForDebug FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:MyApp:transformClassesWithMultidexlistForDebug’.
java.io.IOException: Can’t write [/Users/praubic/Documents/mobile-dev/cocos2dx/cocos2d-x/projects/MyApp/proj.android/app/build/intermediates/multi-dex/debug/componentClasses.jar] (Can’t read [/Users/praubic/.gradle/caches/transforms-1/files-1.1/support-v4-23.3.0.aar/18f8ff625406c1bfd020b3ebdbb66320/jars/classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v4/view/ViewCompat$JbMr1ViewCompatImpl.class]))
I tried re-importing with latest without luck:
sdkbox import share --forcedownload --staging
sdkbox import facebook --forcedownload --staging
Thank you all reporting this issue.
@praubic , what plugins do you have in your project ? Is here more than one support-v4
jar.
plz help to check:
$ find . -name "*support-v4*"
UPDATE : I reproduce this issue.
steps:
sdkbox import facebook
cocos compile -p android
sdkbox import admob
cocos compile -p android
* What went wrong:
Execution failed for task ':cpp317:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [/Users/admin/test/cpp317/proj.android/app/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read [/Users/admin/.gradle/caches/transforms-1/files-1.1/support-v4-23.3.0.aar/e2ca436ae9ec824399a47ef9e8edf1e7/jars/classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v4/view/ViewCompat$JbMr1ViewCompatImpl.class]))
plz
remove ./cocos2d/cocos/platform/android/java/libs/android-support-v4.jar
cleanup
compile again.
I’ll figure out how to solve this issue, android studio compile failed even the android-support-v4.jar
is same.
~/test/cpp317 [master] $ md5 ./cocos2d/cocos/platform/android/java/libs/android-support-v4.jar
MD5 (./cocos2d/cocos/platform/android/java/libs/android-support-v4.jar) = 79ab7eaf6666d4815294110c713ed64d
~/test/cpp317 [master] $ md5 ./cocos2d/cocos/platform/android/java/libs/android_support_v7/appcompat/libs/android-support-v4.jar
MD5 (./cocos2d/cocos/platform/android/java/libs/android_support_v7/appcompat/libs/android-support-v4.jar) = 79ab7eaf6666d4815294110c713ed64d
@energyy , whats your plugins? And is there any other google play services
? whats your cocos2d-x version?
We using sdkboxplay, iap, analytics plugins, cocos2d-x 3.15.
I was also trying to remove android-v4, but then it failed to compile due missing it, what I found in interent there is some strange bug in latest gps itself when it compiled in multidex mode - so not sure if we can fix it or just need to use different gps version.
It seems I found what we had issue with latest GPS it’s conflicting with sdkbox-firebase.jar file, after deliting it everything gg
ot compiled
htlxyz
July 23, 2018, 4:59am
#6
i import firebase on cpp 3.15.1 and 3.17, both can compile success.
and , i unzip sdkbox-firebase.jar, there is no zzcfo.class in it. so it’s not sdkbox-firebase.jar cause conflicting