Build failed when add admob plugin

Hello everyone I’m trying to add admob to my project, this is part of my build.settings
`plugins =
{
[“plugin.admob”] = {
publisherId = “com.coronalabs”,
},
[“CoronaProvider.gameNetwork.google”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { android = true },
},
},
And when build for Android, I got a error after:
FAILURE: Build failed with an exception.
00:04:25.772
00:04:25.772 * What went wrong:
00:04:25.772 Execution failed for task ‘:App:processReleaseManifest’.
00:04:25.772 > Manifest merger failed : Attribute meta-data#com.google.android.gms.version@value value=(4242000) from AndroidManifest.xml:61:20-43
00:04:25.772 is also present at [com.google.android.gms:play-services-basement:17.3.0] AndroidManifest.xml:25:13-66 value=(@integer/google_play_services_version).
00:04:25.772 Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:60:18-61:46 to override.
00:04:25.772
00:04:25.772 * Try:
00:04:25.772 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.
00:04:25.772
00:04:25.772 * Get more help at https://help.gradle.org

I rejoice with all the help!
`

Have you followed the full instructions shown in the docs https://docs.coronalabs.com/plugin/admob/index.html?

i.e. do you have applicationChildElements entry in the Android table, an active AdMob account and a correct app ID, etc.?

Yes, i have it:
applicationChildElements =
{
[[
<meta-data android:name=“com.google.android.gms.ads.APPLICATION_ID”
android:value=“ca-app-pub-secret-key”/>
]],
},

Just saying that you have it is enough. You shouldn’t share confidential keys like that on an open forum.

Oh, yes, that key is key test :slight_smile:

Hi @hongsonvx1. Replace:

[“CoronaProvider.gameNetwork.google”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { android = true },
},

Use this version instead:

1 Like

Oh, this is great, I was able to build successfully, thanks for your help~