Important AdMob and other ad plugin changes

posted in Corona Labs Blog
Published July 22, 2019 Imported
Advertisement

admob-2-1-150x150.pngIt seems that all of our news lately has been wrapped around Google, and so it is again. AdMob has update their libraries again, and in doing so, created a breaking change. Your app’s App Id previously was only needed at the time you initialized the plugin. Google is now looking for it inside the AndroidManifest.XML file. If you wish to use AdMob as well as Appodeal (since it includes AdMob), you must add this to your build.settings:

settings =
{
    android =
    {
        applicationChildElements =
        {
            [[
                <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                    android:value="[YOUR_ADMOB_APP_ID]"/>  -- replace with your app id. See: https://goo.gl/fQ2neu
            ]],
        }
    },
    plugins =
    {
        ["plugin.admob"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}

Simply replace the [YOUR_ADMOB_APP_ID] with your actual App ID inside the quotes and with out the square brackets.

In addition, many of you are still referencing the old legacy AdMob plugin since it was a dependency for many other ad plugins. Please look through your build.settings and remove any references to:

["plugin.google.play.services"]

If you do not remove this, your build will fail and you should get an error message in your console using the latest builds.

You should make these changes before your next attempt to build for Android. See the AdMob implementation documentation for more details.


View the full article

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement