Appodeal plugin causing app to crash

I got an email from Google that my app had been removed due to policy violations in the Appodeal plugin. After reading the forum, I understood that the “beta” version is the one that is recommended for use. I switched to the beta version (no other changes to the app code). Then, the app crashed at startup on a device:

Sep 17 05:11:46.060 SM-A202F: java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException: 

                    SM-A202F: 

                    SM-A202F: ******************************************************************************

                    SM-A202F: * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *

                    SM-A202F: * should follow the instructions here: http

Sep 17 05:11:46.061 s://goo.gl/fQ2neu to add a valid  *

                    SM-A202F: * App ID inside the AndroidManifest. Google Ad Manager publishers should     *

                    SM-A202F: * follow instructions here:                          *

                    SM-A202F: ******************************************************************************

                    SM-A202F: 

                    SM-A202F: 

                    SM-A202F: at android.app.ActivityThread.installProvider(ActivityThread.java:6775)

                    SM-A202F: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6317)

                    SM-A202F: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6232)

                    SM-A202F: at android.app.ActivityThread.access$1200(ActivityThread.java:237)

                    SM-A202F: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1792)

                    SM-A202F: at android.os.Handler.dispatchMessage(Handler.java:106)

                    SM-A202F: at android.os.Looper.loop(Looper.java:214)

                    SM-A202F: at android.app.ActivityThread.main(ActivityThread.java:7078)

                    SM-A202F: at java.lang.reflect.Method.invoke(Native Method)

                    SM-A202F: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)

                    SM-A202F: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

                    SM-A202F: Caused by: java.lang.IllegalStateException: 

                    SM-A202F: 

                    SM-A202F: ******************************************************************************

                    SM-A202F: * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *

                    SM-A202F: * should follow the instructions here: https://goo.gl/fQ2neu to add a valid  *

                    SM-A202F: * App ID inside the AndroidManifest. Google Ad Manager publishers should     *

                    SM-A202F: * follow instructions here:                          *

                    SM-A202F: ******************************************************************************

                    SM-A202F: 

                    SM-A202F: 

                    SM-A202F: at com.google.android.gms.internal.ads.zzabh.attachInfo(Unknown Source:16)

                    SM-A202F: at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3)

                    SM-A202F: at android.app.ActivityThread.installProvider(ActivityThread.java:6770)

                    SM-A202F: … 10 more

                    

This is what my build.settings looks like:

plugins = { ['plugin.appodeal.beta.base'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.GoogleAdMob'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.StartApp'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.AdColony'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.AppLovin'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Chartboost'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.FacebookAudience'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Flurry'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.InMobi'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.IronSource'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Mobvista'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.MyTarget'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Ogury'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.AmazonAds'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.TwitterMoPub'] = { publisherId = 'com.coronalabs' }, },

Any idea what this could be?

Any idea what this could be?

Did you read what you yourself posted? It states twice that you have not properly initialised AdMob and that you should follow the instructions behind the link.

Assuming that’s all there is, then you could also read what Rob posted a while back to the blog:
https://coronalabs.com/blog/2019/07/22/important-admob-and-other-ad-plugin-changes/

Yes, I read the page behind the link but those instructions are for coding Android native, not Corona. I also read the post you are referring to but as far as I could understand, that was for the AdMob plugin, wich I am not using. However, I now see that it does in fact concern the Appodeal plugin as well. Sorry about that…

There are two things I still don’t understand from the blog post:

  1. Do I have to explicitly add the AdMob plugin “plugin.admob” although I am just using the Appodeal plugin (where the admob module is imported anyway)?

  2. What is an AdMob app id? I have an Appodeal app id but I am not aware of an AdMob app id

Thanks for your help/patience…

  1. No. Please read the detailed and explicit instructions on how to setup Appodeal plugin from the docs:
    https://docs.coronalabs.com/plugin/appodeal/index.html#project-settings

  2. In order to use AdMob via Appodeal, you need to register for an AdMob account.

What leads you to believe that blog post is about native code? It’s 100% build.settings for simulator builds.

Regardless of if you’re using plugin.admob or Appodeal, you now have to include a piece of XML in your build.settings that we inject into the AndoidManifest.xml for you. 

If you don’t want to use GoogleAdMob with Appodeal, remove those adapters from your build.settings.

Rob

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

            ]],

        },

 

Have you done this ^ ?

@Rob: not the blog post, the link in the error message.

@XeduR @Spyric: I missed that the docs had been updated with the info from the blog post.

@JoePringles: yes, I found it in the docs eventually.

Thanks for the patience guys!

Yaa i checked it once…Unfortunately was giving  some errors then…Gonna try it once more today