BUILD FAILED in Solar2d 2020.3638

I can’t make the apk with the new version. Displays a duplicate file error. How to solve this? before I was using the Solar2D 2020.3635 version and it worked perfectly.

17:38:49.831  Testing credentials for 'C:\Users\mathe\OneDrive\Área de Trabalho\keytool\Square World\SquareWorld.jks': 
17:38:51.238  jar signed.
17:38:51.238  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
17:39:32.136  Excluding specified files from build: 
17:39:32.136     excluding: Icon.png
17:39:32.136     excluding: Icon-??.png
17:39:32.136     excluding: Icon-???.png
17:39:32.136     excluding: LaunchScreen.storyboardc
17:39:32.136     excluding: Images.xcassets
17:39:32.136  
17:39:32.136  FAILURE: Build failed with an exception.
17:39:32.136  
17:39:32.136  * What went wrong:
17:39:32.136  Execution failed for task ':App:checkReleaseDuplicateClasses'.
17:39:32.136  > 1 exception was raised by workers:
17:39:32.136    java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.measurement.zzbt found in modules play-services-measurement-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement:17.4.4) and play-services-measurement-sdk-api-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:17.5.0)
17:39:32.136    Duplicate class com.google.android.gms.internal.measurement.zzbu found in modules play-services-measurement-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement:17.4.4) and play-services-measurement-sdk-api-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:17.5.0)
17:39:32.136    Duplicate class com.google.android.gms.internal.measurement.zzfw found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    Duplicate class com.google.android.gms.internal.measurement.zzfy found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    Duplicate class com.google.android.gms.internal.measurement.zzfz found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    Duplicate class com.google.android.gms.internal.measurement.zzga found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    Duplicate class com.google.android.gms.internal.measurement.zzgb found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    Duplicate class com.google.android.gms.measurement.internal.zzgz found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    Duplicate class com.google.android.gms.measurement.internal.zzik found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
17:39:32.136    
17:39:32.136    Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
17:39:32.136  
17:39:32.136  
17:39:32.136  * Try:
17:39:32.136  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
17:39:32.136  
17:39:32.136  * Get more help at https://help.gradle.org
17:39:32.136  
17:39:32.136  BUILD FAILED in 38s
17:39:32.136  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
17:39:33.146  Android build failed (1) after 42 seconds

Same issue for me. It was a conflict in the plugins - for me removing firebaseAnalytics plugin allowed it to build - might be different one for you. Unfortunately until the plugin creator fixes this I cannot release an update to my game.

If you are using one of Scott’s plugin make sure you have the Id. If you still get it for some it has been Scott’s review plugin.

I updated my java jdk and changed the code for firebase Analytics, I was using the old format of the code. Try to upgrade to this one, it worked for me.

["plugin.firebaseAnalytics"] = {publisherId = "tech.scotth", marketplaceId = "insert marketplace account ID"}

I have the same error in Solar 2021.3639, the last JDK is installed.

I figured out, that the AdMob plugin was the cause. It seems, that its documentation hasn’t changed and my plugin section is still correct, so what can I do with it?

I found solution to this problem. add corona.graddle to AndroidResources in you app folder. in corona.gradle put this

dependencies {
    implementation platform('com.google.firebase:firebase-bom:26.5.0')
}
2 Likes