Daily build: won't build with GPGS v2 plugin (error 256)

Hi, I’m trying to get a 64 bit version of an app out, but after trying a variety of things I’ve narrowed it down to the following build failure when GPGS.v2 plugin is enabled (the app builds fine with it disabled)

Can anyone shed some light on what this error log actually means?

Thanks!

Using java version “12.0.2” 2019-07-16

                    Java™ SE Runtime Environment (build 12.0.2+10)

                    Java HotSpot™ 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

Aug 29 11:58:51.521 Building Android app for ****** with 2019.3519

Aug 29 11:58:52.526 Using custom build id from app bundle: 00000 (AppSettings.lua)

Aug 29 11:58:54.855 BUILD SUCCESSFUL

                    Total time: 1 second

Aug 29 12:01:09.306 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpfYqTwN/template/app/src/main/AndroidManifest.xml:63:20-43 Error:

Aug 29 12:01:09.307 Attribute meta-data#com.google.android.gms.version@value value=(4242000) from AndroidManifest.xml:63:20-43

Aug 29 12:01:09.307 is also present at [com.google.android.gms:play-services-basement:16.2.0] AndroidManifest.xml:25:13-66 value=(@integer/google_play_services_version).

                    Suggestion: add ‘tools:replace=“android:value”’ to <meta-data> element at AndroidManifest.xml:62:18-63:46 to override.

Aug 29 12:01:09.307 FAILURE: 

Aug 29 12:01:09.307 Build failed with an exception.

                    

                    * What went wrong:

Aug 29 12:01:09.307 Execution failed for task ‘:App:processReleaseManifest’.

                    > 

Aug 29 12:01:09.308 Manifest merger failed : Attribute meta-data#com.google.android.gms.version@value value=(4242000) from AndroidManifest.xml:63:20-43

Aug 29 12:01:09.308   is also present at [com.google.android.gms:play-services-basement:16.2.0] AndroidManifest.xml:25:13-66 value=(@integer/google_play_services_version).

                      Suggestion: add ‘tools:replace=“android:value”’ to <meta-data> element at AndroidManifest.xml:62:18-63:46 to override.

Aug 29 12:01:09.308 * Try:

                    Run with --stacktrace

Aug 29 12:01:09.308  option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan

Aug 29 12:01:09.308  to get full insights.

                    

                    * Get more help at https://help.gradle.org

Aug 29 12:01:09.308 BUILD FAILED in 2m 14s

Aug 29 12:01:09.936 Excluding specified files from build: 

                       excluding: assets/landscape/*

                       excluding: assets/ipx/*

                    Android build failed (256) after 137 seconds

Aug 29 12:01:10.175 ERROR: Build Failed: Failed to Build

                    

                    Error code: 256

android = { manifestChildElements = { -- Array of strings [[\<meta-data tools:replace="android:value" /\>]], }, }, }

I am not sure what the conflict is but I would do what it suggest by adding the above.

If that doesn’t work you might have to supplement what I provided above with the version. It look like you have 2 plugins one using version 17.0.0 and one using version 16.2.0 of the google support libraries.

I tried adding <meta-data tools:replace=“android:value” /> according to your suggestion but got the following error message instead:

Using custom build id from app bundle: 00000 (AppSettings.lua)

Aug 29 04:43:51.081 BUILD SUCCESSFUL

                    Total time: 1 second

Aug 29 04:45:10.415 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpP7iqgb/template/app/src/main/AndroidManifest.xml:67:7-50 Error:

Aug 29 04:45:10.416 Missing ‘name’ key attribute on element meta-data at AndroidManifest.xml:67:7-50

Aug 29 04:45:10.416 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpP7iqgb/template/app/src/main/AndroidManifest.xml:67:7-50 Error:

                    tools:replace specified at line:67 for attribute android:value, but no new value specified

Aug 29 04:45:10.416 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpP7iqgb/template/app/src/main/AndroidManifest.xml Error:

Aug 29 04:45:10.416 Validation failed, exiting

                    

                    FAILURE: 

Aug 29 04:45:10.416 Build failed with an exception.

                    

                    * What went wrong:

                    Execution failed for task ‘:App:processReleaseManifest’.

                    > 

Aug 29 04:45:10.417 Manifest merger failed with multiple errors, see logs

                    

Can you share your build.settings with us?

Rob

Of course, here is build.settings with irrelevant iOS code removed:

settings =

{

plugins =

    {

        [“CoronaProvider.native.popup.social”] =

        {

            publisherId = “com.coronalabs”

        },

    

[“CoronaProvider.native.popup.activity”] =

{

publisherId = “com.coronalabs”,

– supportedPlatforms = { iphone=true, [“iphone-sim”]=true, ipad = true ,},

supportedPlatforms = { iphone=true, ipad = true ,},

},

  [“CoronaProvider.gameNetwork.google”] =

  {

     publisherId = “com.coronalabs”,

 supportedPlatforms = { android=true },

    },

  

  [“plugin.gpgs.v2”] = {

            publisherId = “com.coronalabs”,

            supportedPlatforms = {[“android”] = true, [“android-kindle”] = true}

        },

  

  

    },     

excludeFiles = {

android = {‘assets/landscape/*’, ‘assets/ipx/*’,},

ios = {‘assets/landscape/*’},

macos = {‘assets/ipx/*’,},

win32 = {‘assets/ipx/*’,},

},

orientation =

{

default = “portraitTop”,

supported = { “portraitTop”, “portraitBottom” }

},

splashScreen = 

   {

       enable = false

   },

android =

googlePlayGamesAppId = “nnnnnnnnnnnn”,

– usesExpansionFile = true,

usesPermissions =

{

“android.permission.VIBRATE”,

“android.permission.INTERNET”,

“android.permission.STATUS_BAR”,

“android.permission.WRITE_INTERNAL_STORAGE”,

“android.permission.WRITE_EXTERNAL_STORAGE”,

“com.android.vending.CHECK_LICENSE”,

},

       usesFeatures =

       {

           { name=“android.hardware.sensor.accelerometer”, required=true },

           { name=“android.hardware.screen.portrait”, required=true },

       },

manifestChildElements = 

{

– Array of strings

[[

<meta-data tools:replace=“android:value” />

]],

},

},

}

Why are you using gpgs and gameNetwork? Just delete the gameNetwork entry. You don’t need both.

Thanks Agramonte, that solved it. I didn’t know gameNetwork.google was unnecessary.

android = { manifestChildElements = { -- Array of strings [[\<meta-data tools:replace="android:value" /\>]], }, }, }

I am not sure what the conflict is but I would do what it suggest by adding the above.

If that doesn’t work you might have to supplement what I provided above with the version. It look like you have 2 plugins one using version 17.0.0 and one using version 16.2.0 of the google support libraries.

I tried adding <meta-data tools:replace=“android:value” /> according to your suggestion but got the following error message instead:

Using custom build id from app bundle: 00000 (AppSettings.lua)

Aug 29 04:43:51.081 BUILD SUCCESSFUL

                    Total time: 1 second

Aug 29 04:45:10.415 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpP7iqgb/template/app/src/main/AndroidManifest.xml:67:7-50 Error:

Aug 29 04:45:10.416 Missing ‘name’ key attribute on element meta-data at AndroidManifest.xml:67:7-50

Aug 29 04:45:10.416 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpP7iqgb/template/app/src/main/AndroidManifest.xml:67:7-50 Error:

                    tools:replace specified at line:67 for attribute android:value, but no new value specified

Aug 29 04:45:10.416 /private/var/folders/r_/n2p0_fl90wxfl1yr2zmkyk640000gn/T/CLtmpP7iqgb/template/app/src/main/AndroidManifest.xml Error:

Aug 29 04:45:10.416 Validation failed, exiting

                    

                    FAILURE: 

Aug 29 04:45:10.416 Build failed with an exception.

                    

                    * What went wrong:

                    Execution failed for task ‘:App:processReleaseManifest’.

                    > 

Aug 29 04:45:10.417 Manifest merger failed with multiple errors, see logs

                    

Can you share your build.settings with us?

Rob

Of course, here is build.settings with irrelevant iOS code removed:

settings =

{

plugins =

    {

        [“CoronaProvider.native.popup.social”] =

        {

            publisherId = “com.coronalabs”

        },

    

[“CoronaProvider.native.popup.activity”] =

{

publisherId = “com.coronalabs”,

– supportedPlatforms = { iphone=true, [“iphone-sim”]=true, ipad = true ,},

supportedPlatforms = { iphone=true, ipad = true ,},

},

  [“CoronaProvider.gameNetwork.google”] =

  {

     publisherId = “com.coronalabs”,

 supportedPlatforms = { android=true },

    },

  

  [“plugin.gpgs.v2”] = {

            publisherId = “com.coronalabs”,

            supportedPlatforms = {[“android”] = true, [“android-kindle”] = true}

        },

  

  

    },     

excludeFiles = {

android = {‘assets/landscape/*’, ‘assets/ipx/*’,},

ios = {‘assets/landscape/*’},

macos = {‘assets/ipx/*’,},

win32 = {‘assets/ipx/*’,},

},

orientation =

{

default = “portraitTop”,

supported = { “portraitTop”, “portraitBottom” }

},

splashScreen = 

   {

       enable = false

   },

android =

googlePlayGamesAppId = “nnnnnnnnnnnn”,

– usesExpansionFile = true,

usesPermissions =

{

“android.permission.VIBRATE”,

“android.permission.INTERNET”,

“android.permission.STATUS_BAR”,

“android.permission.WRITE_INTERNAL_STORAGE”,

“android.permission.WRITE_EXTERNAL_STORAGE”,

“com.android.vending.CHECK_LICENSE”,

},

       usesFeatures =

       {

           { name=“android.hardware.sensor.accelerometer”, required=true },

           { name=“android.hardware.screen.portrait”, required=true },

       },

manifestChildElements = 

{

– Array of strings

[[

<meta-data tools:replace=“android:value” />

]],

},

},

}

Why are you using gpgs and gameNetwork? Just delete the gameNetwork entry. You don’t need both.

Thanks Agramonte, that solved it. I didn’t know gameNetwork.google was unnecessary.