Build failed with an exception - Solar2D 2020.3621

I’m trying to make a build for my new app right now and just received this error:

Console content:

FAILURE: Build failed with an exception.
19:49:55.861
19:49:55.861 * What went wrong:
19:49:55.861 Could not determine the dependencies of task ‘:App:collectReleaseDependencies’.
19:49:55.861 > Could not resolve all task dependencies for configuration ‘:App:releaseRuntimeClasspath’.
19:49:55.861 > Could not find any matches for com.google.android.gms:play-services-ads-base:[19.3.0] as no versions of com.google.android.gms:play-services-ads-base are available.
19:49:55.861 Searched in the following locations:
19:49:55.861 - https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-ads-base/maven-metadata.xml
19:49:55.861 - https://jcenter.bintray.com/com/google/android/gms/play-services-ads-base/maven-metadata.xml
19:49:55.861 - file:/C:/Program Files (x86)/Corona Labs/Corona/Native/Corona/android/lib/gradle/
19:49:55.861 - file:/C:/Program Files (x86)/Corona Labs/Corona/Native/Corona/android/lib/Corona/libs/
19:49:55.861 Required by:
19:49:55.861 project :App > com.google.android.gms:play-services-ads:19.3.0
19:49:55.861 > Could not find any matches for com.google.android.gms:play-services-ads-lite:[19.3.0] as no versions of com.google.android.gms:play-services-ads-lite are available.
19:49:55.861 Searched in the following locations:
19:49:55.861 - https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-ads-lite/maven-metadata.xml
19:49:55.861 - https://jcenter.bintray.com/com/google/android/gms/play-services-ads-lite/maven-metadata.xml
19:49:55.861 - file:/C:/Program Files (x86)/Corona Labs/Corona/Native/Corona/android/lib/gradle/
19:49:55.861 - file:/C:/Program Files (x86)/Corona Labs/Corona/Native/Corona/android/lib/Corona/libs/
19:49:55.861 Required by:
19:49:55.861 project :App > com.google.android.gms:play-services-ads:19.3.0
19:49:55.861 > Could not find any matches for com.google.android.gms:play-services-gass:[19.3.0] as no versions of com.google.android.gms:play-services-gass are available.
19:49:55.861 Searched in the following locations:
19:49:55.861 - https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-gass/maven-metadata.xml
19:49:55.861 - https://jcenter.bintray.com/com/google/android/gms/play-services-gass/maven-metadata.xml
19:49:55.861 - file:/C:/Program Files (x86)/Corona Labs/Corona/Native/Corona/android/lib/gradle/
19:49:55.861 - file:/C:/Program Files (x86)/Corona Labs/Corona/Native/Corona/android/lib/Corona/libs/
19:49:55.861 Required by:
19:49:55.861 project :App > com.google.android.gms:play-services-ads:19.3.0
19:49:55.861
19:49:55.861 * Try:
19:49:55.861 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.
19:49:55.861
19:49:55.861 * Get more help at https://help.gradle.org
19:49:55.861
19:49:55.861 BUILD FAILED in 1m 2s
19:49:55.861 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
19:49:57.877 Android build failed (1) after 72 seconds

Share your build.settings file with us. Looks like you may have something wrong there.

Feel free to modify any IDs++ you don’t want to share.

Ok, check it out:

settings =
{
  splashScreen =
	{
    enable = false,
  },
  
	orientation =
	{
      -- Supported values for orientation:
      -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
      default = "portrait",
      supported = { "portrait", },
	},

	--
	-- Android section
	--
	android =
	{
      minSdkVersion = "16",
      
      -- this for Admob
      applicationChildElements =
      {
          [[
              <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                  android:value="ca-app-pub-3363652022079333~314126ABCD"/>  -- replace with your Admob app id. See: https://goo.gl/fQ2neu
          ]],
      },
      
      
      facebookAppId = "63344741066ABCD",
      
      versionCode = "1", 
      
      usesPermissions =
      {
        "com.android.vending.CHECK_LICENSE", -- to use gpgs plugin
        "com.android.vending.BILLING",
        "android.permission.INTERNET",
        "android.permission.WRITE_EXTERNAL_STORAGE",
        "android.permission.RECEIVE_BOOT_COMPLETED",
      },
      
      useGoogleServicesJson = true,
      googlePlayGamesAppId = "60964060ABCD",
	},

	--
	-- iOS section
	--
	iphone =
	{
		xcassets = "Images.xcassets",
		plist =
		{
        UIStatusBarHidden = false,
        UILaunchStoryboardName = "LaunchScreen",
        
        CFBundleLocalizations =
            {
                "en",  --English
                "es",  --Spanish
                "fr",  --French
                "it",  --Italian
                "pt",  --Portuguese
                "zh",  --Chinese
                "ja",  --Japanese
                "ko",  --Korean
                "de",  --German
                "ru",  --Russian
            },
            CFBundleDisplayName = "Fill the Rainbow",
            CFBundleName = "Fill the Rainbow",
            
            -- para facebook
            UIApplicationExitsOnSuspend = false,
            FacebookAppID = "63344741066ABCD",
            CFBundleURLTypes =
            {
                { CFBundleURLSchemes = { "fb63344741066ABCD", } }  -- Replace XXXXXXXXXX with your Facebook App ID ( con el prefijo 'fb' )
            },
            -- Whitelist Facebook apps
            LSApplicationQueriesSchemes =
            {
                "fb",  -- Needed for the facebook-v4a.isFacebookAppEnabled() API
                "fbapi",
                "fbauth2",
                "fb-messenger-api",
                "fbshareextension"
            },
      },
	},

	--
	-- Plugins section
	--
	plugins =
	{
      ["CoronaProvider.native.popup.social"] =
      {
          publisherId = "com.coronalabs"
      },
      
      ["plugin.facebook.v4a"] =
      {
          publisherId = "com.coronalabs"
      },
        
      ["plugin.google.iap.v3"] =
      {
          publisherId = "com.coronalabs",
          supportedPlatforms = { android=true }
      },
        
      ["plugin.gpgs.v2"] = {
          publisherId = "com.coronalabs",
          supportedPlatforms = { ["android"] = true, }
      },
      
      ["plugin.admob"] =
      {
          publisherId = "com.coronalabs",
      },
        
      ["plugin.notifications.v2"] =
      {
          publisherId = "com.coronalabs",
          supportedPlatforms = { android=true, iphone=true }
      },
        
      ["plugin.gameanalytics_v2"] = 
      {
          publisherId = "com.gameanalytics",
          supportedPlatforms = { android=true, iphone=true }
      },
      
      -- APP ID:
      -- Developer id:
      -- API Token v1:TOK1
      -- API Token v2: TOK2
      --["plugin.appsflyer"] = {
      --    publisherId = "com.coronalabs",
      --},
      
      --["plugin.flurry.analytics"] =
      --{
      --    publisherId = "com.coronalabs",
      --    supportedPlatforms = { android=true, iphone=true }
      --},
        
      --["plugin.startapp"] =
      --{
      --    publisherId = "com.startapp",
      --},
        
      ["plugin.amazon.iap"] =
      {
          publisherId = "com.coronalabs",
          supportedPlatforms = { ["android-kindle"]=true }
      },

      ["CoronaProvider.gameNetwork.apple"] =
      {
          publisherId = "com.coronalabs",
          supportedPlatforms = { iphone=true }
      },
	},

	--
	-- Project section
	--
	excludeFiles =
	{
		-- Exclude unnecessary files for each platform
  		all = { "Icon.png", "Icon*.ico", "Icon*.icns", "no_incluir", "Thumbs.db" },
      ios = { "Icon.png", "Icon-*dpi.png", "AndroidResources" },
      android = { "*.lproj", "LaunchScreen.storyboardc", "Images.xcassets" },
	},
}

IDs modified by RoamingGamer to protect your privacy.

OK. I’m not sure right now what the reason for the failure is.

Back up your project.

  1. Temporarily comment out the AdMob parts of build.settings. ID and plugin section.

  2. Comment out any code in main.lua that launches subsequent actions. You can probably comment it all out.

  3. Rebuild.

If that builds, then you’ve got something wrong with your adMob setup.

I can’t remember right now if all Corona/Solar2D plugins are by default activated or not. I think AdMob is activated by default… but I’d like to hear someone else weigh in on that.

Post back after trying to build as mentioned above.

Ok, I have commented the applicationChildElements table and the call to the admob plugin and he build was successfully created.

I’ll try rebuilding one of my projects that has AdMob using 2020.3621 later today and see what I get.

Sorry for the delay, but I’m at my day job. :frowning:

I don’t believe Admob currently works. I believe it is on the list of todos for Vlads. Technically you can add either of the libraries that are missing to your corona.gradle file.

1 Like