-1

Tired of this problem When I work to run the program, this message comes up < unfortunately App has stopped >

07-05 22:10:45.275 6267-6267/? I/art: Late-enabling -Xcheck:jni

07-05 22:10:45.471 6267-6267/? W/System: ClassLoader referenced unknown path: /data/app/com.example.sendibad-2/lib/arm 07-05 22:10:45.475 6267-6267/? D/ActivityThread: installProvider: context.getPackageName()=com.example.sendibad 07-05 22:10:45.547 6267-6267/? D/AndroidRuntime: Shutting down VM 07-05 22:10:45.556 6267-6267/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sendibad, PID: 6267 java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:

******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
* should follow the instructions here:                                       *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to add a valid App ID inside the AndroidManifest.                          *
* Google Ad Manager publishers should follow instructions here:              *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest.   *
******************************************************************************


    at android.app.ActivityThread.installProvider(ActivityThread.java:5465)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5035)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4975)
    at android.app.ActivityThread.-wrap1(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
    at android.os.Handler.dispatchMessage(Handler.java:111)
    at android.os.Looper.loop(Looper.java:207)
    at android.app.ActivityThread.main(ActivityThread.java:5763)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
 Caused by: java.lang.IllegalStateException: 

******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
* should follow the instructions here:                                       *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to add a valid App ID inside the AndroidManifest.                          *
* Google Ad Manager publishers should follow instructions here:              *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest.   *
******************************************************************************


    at com.google.android.gms.internal.ads.zzxw.attachInfo(com.google.android.gms:play-services-ads-lite@@18.3.0:27)
    at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(com.google.android.gms:play-services-ads-lite@@18.3.0:3)
    at android.app.ActivityThread.installProvider(ActivityThread.java:5462)
        ... 10 more

07-05 22:10:45.602 6267-6267/? I/Process: Sending signal. PID: 6267 SIG: 9

and this ManiFest

<?xml version="1.0" encoding="utf-8"?>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".Webhtm"></activity>
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
alfrazdag
  • 3
  • 2

2 Answers2

0
  1. Goto https://support.google.com/admob/answer/7356219?visit_id=637295692411748559-1196965477&hl=en&ref_topic=7384587&rd=1
  2. Create a Google AdMob account and register your app
  3. Generate Google ADs key
  4. use the steps outlined in link below and add the generated ad key to your manifest

https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml

0

The actual error for you is -

FATAL EXCEPTION: main Process: com.example.sendibad, PID: 6267 java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider

can you try adding code below and see if it fixes this issues mentioned here - https://stackoverflow.com/a/62080313/1994089

<meta-data
  android:name="com.google.android.gms.ads.AD_MANAGER_APP"
  android:value="true"/>