【发布时间】:2020-10-25 20:16:58
【问题描述】:
厌倦了这个问题 当我运行程序时,出现此消息
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 引用了未知路径:/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:关闭虚拟机 07-05 22:10:45.556 6267-6267/? E/AndroidRuntime: 致命异常: main 进程:com.example.sendibad,PID:6267 java.lang.RuntimeException:无法获取提供程序 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:发送信号。 PID:6267 SIG:9
还有这个 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>
【问题讨论】:
-
您是否按照googlemobileadssdk.page.link/admob-android-update-manifest 的说明在AndroidManifest 中添加了有效的App ID?
-
谢谢亲爱的,请告诉我该怎么做,我的意思是(步骤)