Failed Android Build (3638) after MacOS 11.2.1 update

Is anyone having difficulty building for Android with admob as a plugin?

I get error 256 when I try to build. If I remove admob from build settings the app builds succesfully.

I haven’t changed a line of code in my project and I successfully built for Android over the weekend before I updated.

I have already tried removing and reinstalling Java, but no dice.

$ java -version
java version “1.8.0_281”
Java™ SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot™ 64-Bit Server VM (build 25.281-b09, mixed mode)

Same software and plugin, but no issues here.

Could you show us the full stacktrace?

1 Like

Here is the full log.

Using openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)

BUILD SUCCESSFUL
Total time: 1 second
Excluding specified files from build: 
   excluding: LaunchScreen.storyboardc
   excluding: Icon.png
   excluding: Icon-*dpi.png
   excluding: Images.xcassets

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':App:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  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)
  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)
  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)
  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)
  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)
  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)
  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)
  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)
  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)
  
  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.


* Try:
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.

The error says:

Duplicate class com.google.android

This means you are using two plugins that share the same library. Since @vlads is fairly good at keeping the original Solar2d plugins from colliding. I suspect you are using a combination of original Solar2d plugins with some other marketplace plugins.

If you provide your build settings, I can probably venture a guess.

1 Like

This is whats under the hood.
settings =
{
orientation =
{
– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = “portrait”,
supported = { “portrait”, },
},

splashScreen = 
{
    enable = false
  --[[  
  	ios = {
        enable = true,
        image = "mySplashScreen_iOS.png"
    },
    android = {
        enable = true,
        image = "mySplashScreen_Android.png"
    }
    ]]
},

--
-- Android section
--
android =
{
	usesPermissions =
	{
		"android.permission.INTERNET",
		"android.permission.ACCESS_NETWORK_STATE",
	},
	minSdkVersion = "16" ,
	
	"android.permission.RECEIVE_BOOT_COMPLETED",
	applicationChildElements =
    {
        [[
            <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                android:value="ca-app-pub-xxxxxxxxxxx"/>  
        ]],
    },
},

--
-- iOS section
--
iphone =
{
	xcassets = "Images.xcassets",
	plist =
	{
		GADApplicationIdentifier = "ca-app-pub-xxxxxxxxxxx",
		UIStatusBarHidden = false,
		UILaunchStoryboardName = "LaunchScreen",
		UIPrerenderedIcon = true, -- set to false for "shine" overlay
		--UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend

		--[[
		-- iOS app URL schemes:
		CFBundleURLTypes =
		{
			{
				CFBundleURLSchemes =
				{
					"fbXXXXXXXXX",  -- replace XXXXXXXXX with your Facebook appId
				}
			}
		}


		
		--]]
	}
},
--
-- Plugins section
--

plugins =
{	
	["plugin.playfab.client"] = 
	{ 
		publisherId = "com.playfab" 
	},	
	["plugin.flurry.analytics"] =
    {
        publisherId = "com.coronalabs"
    },
    ["plugin.reviewPopUp"] =
	{
		publisherId="tech.scotth",
		marketplaceId = "xxxxxx",
	},		
	["plugin.notifications.v2"] =
    {
        publisherId = "com.coronalabs"
    },
    ["plugin.admob"] =
    {
        publisherId = "com.coronalabs"
    },
},

--
-- Project section
--
excludeFiles =
{
	-- Exclude unnecessary files for each platform
	all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", },
	android = { "LaunchScreen.storyboardc", },
},

}
`

My guess is the review pop-up is the culprit. Remove that and you should be able to build.

1 Like

Well, I am glad to say your guess is right.

Removing the pop-up review plugin does allow the build fine.

Thank you @agramonte and @depilz for taking time to help me out.

1 Like

I have the same issue for the same reason - what if I am using the review popup?

actually is wasn’t exactly the same reason, hmm…this project has built fine many times before but suddenly it is failing to build.

13:09:56.427 FAILURE: Build failed with an exception.
13:09:56.427
13:09:56.427 * What went wrong:
13:09:56.427 Execution failed for task ‘:App:checkReleaseDuplicateClasses’.
13:09:56.427 > 1 exception was raised by workers:
13:09:56.427 java.lang.RuntimeException: 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427 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)
13:09:56.427

The duplicate class error just means that. Two or more plugins are using the same class library and usually, they are different versions. Simply remove half the plugins to see if it builds rinse and repeat until your find the culprits or culprit. Then your options are either to not use the said plugin or open up a ticket or send a request to one of the plugin makers to get updated.

There are other options but those require to use the base plugin and change the files inside the plugin to not conflict. A task that is not that trivial.

Since I have been using Solar2D the “duplicate” class error has been one of the more popular one.

seems to be firebaseAnalytics which I def need. ok maybe I email scott…

reviewPopup seems fine to me just firebaseAnalytics. maybe he will update - I put in a bug report.