BUILD FAILED in Solar2d 2020.3635

Hi there,
Just now i’m trying to make an update for one of my games and i got this error in the console:

Changes I made: the only change i did was updating the Google Play Billing plugin.
FAILURE: Build failed with an exception.
01:52:16.436
01:52:16.436 * What went wrong:
01:52:16.436 Could not determine the dependencies of task ‘:App:lintVitalRelease’.
01:52:16.436 > Could not resolve all artifacts for configuration ‘:App:debugCompileClasspath’.
01:52:16.436 > Could not download appcompat-1.1.0.aar (androidx.appcompat:appcompat:1.1.0)
01:52:16.436 > Could not get resource ‘https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar’.
01:52:16.436 > Connection reset
01:52:16.436 > Could not find play-services-ads-identifier-17.0.0.jar (com.google.android.gms:play-services-ads-identifier:17.0.0).
01:52:16.436 Searched in the following locations:
01:52:16.436 https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-ads-identifier/17.0.0/play-services-ads-identifier-17.0.0.jar
01:52:16.436
01:52:16.436 * Try:
01:52:16.436 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.
01:52:16.436
01:52:16.436 * Get more help at https://help.gradle.org
01:52:16.436
01:52:16.436 BUILD FAILED in 1m 22s
01:52:16.436 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
01:52:18.407 Android build failed (1) after 87 seconds

build settings? specifically the plugin section.

I have updated this game before. The unique change I made was the billing plugin.
This is my build.settings file:

settings =
{
splashScreen =
{
enable = false,
},

orientation =
{
	default = "portrait",
	supported = { "portrait", },
},

-- Android section

android =
{
  minSdkVersion = "16",
  
  applicationChildElements =
  {
      [[
          <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
              android:value="myApplicationAppId"/>
      ]],
  },
  
  facebookAppId = "myFacebookAppId",
  
  versionCode = "23",
  
  usesPermissions =
  {
    "com.android.vending.CHECK_LICENSE",
    "com.android.vending.BILLING",
    "android.permission.INTERNET",
    "android.permission.WRITE_EXTERNAL_STORAGE",
    "android.permission.RECEIVE_BOOT_COMPLETED",
  },
  
  useGoogleServicesJson = true,
  googlePlayGamesAppId = "myGooglePlayGamesAppId",
},

  -- Plugins section
    plugins =
{
  ["CoronaProvider.native.popup.social"] =
  {
      publisherId = "com.coronalabs"
  },
  
  ["plugin.facebook.v4a"] =
  {
      publisherId = "com.coronalabs"
  },
    
  ["plugin.google.iap.billing"] =
  {
      publisherId = "com.coronalabs",
  },
    
  ["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 }
  },
  
},

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

}

It seems you have some connectivity issues. Try again…

1 Like

Just now i tried and i got the same. I’m frustrated. I do not know why i can update my apps but not my games (the only difference is the billing and play games services plugins)

I tried to replicate your issue and was not successful. @vlads is probably correct. The only part I couldn’t replicate was the json file since I wouldn’t have the same one you have. Probably will not work but could you try removing:

useGoogleServicesJson = true,

Thank you agramonte. I commented that line but the issue persists. I think it is the network connectivity because here in my country it is to slow.

1 Like

Well, the problem is the facebook plugin. I have commented the lines corresponding to this plugin in my build.settings file and the build is done. Anyone can say anything about that?

Hi @vlads , could you tell me if this section of my build.settings file is ok: (the documentation does not have a good explanation about the applicationChildElements directive)

  facebookAppId = "MyFacebookAppId",
  
     applicationChildElements = {
      [[
          <provider android:authorities="com.facebook.app.FacebookContentProviderMyFacebookAppId"
              android:name="com.facebook.FacebookContentProvider" android:exported="true"/>
      ]],
  },
  
 -- for admob
  applicationChildElements =
  {
      [[
          <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
              android:value="myAppId"/> 
      ]],
  },

I am not sure what you are asking but this is what one of my apps looks like:

applicationChildElements =
        {
            [[
                <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                    android:value="xxxxxxxxx"/> 
            ]],
            [[
                <meta-data android:name="com.tapjoy.appstore" android:value="Huawei"/>
            ]],
            [[
                <receiver android:name="com.tenjin.android.TenjinReferrerReceiver" android:exported="true">
                    <intent-filter>
                    <action android:name="com.android.vending.INSTALL_REFERRER"/>
                    </intent-filter>
                </receiver>
            ]]
        },

Ok, I use admob and facebook plugins in my app, and both need to use the applicationChildElements directive, but i did not know how to implement it.

Thanks a lot!

Glad I can help. Just stack them with commas in-between.

Ok, according to your structure I made changes in my build.setting file but i could not make the build yet. Then i removed all lines related with facebook plugin and the build was ok.

my applicationChildElements directive:

applicationChildElements = {

      [[
          <provider android:authorities="com.facebook.app.FacebookContentProvidermyFacebookAppId"
                    android:name="com.facebook.FacebookContentProvider" android:exported="true"/>
      ]],
      [[
          <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                     android:value="myAdmobAppId"/>  -- replace with your Admob app id. See: https://goo.gl/fQ2neu
      ]]
  },

that looks correct

Yes, but I could not make the build with the facebook plugin added

I think i will make another post here with this.

Whatever goes into your manifest is public, no reason to censor it with placeholders