我在安卓系统上运行计算器应用程序时遇到了问题



$adb-shell am start-n"me.zanecoleriley.calculator/me.zanecolerley.cacalculator.MainActivity"-a android.intent.action.MAIN-c android.intent.tegory.LAUNCHER已连接到设备"emulator-5554"上的进程7940。从应用程序捕获并显示logcat消息。这种行为可以在";Logcat输出";";调试器";设置页面。D/NetworkSecurityConfig:未指定网络安全配置,使用平台默认值D/NetworkSecurityConfig:未指定网络安全配置,使用平台默认值D/AndroidRuntime:关闭VME/AndroidRuntime:致命异常:main流程:me.zanecoleriley.calculator,PID:7940java.lang.RuntimeException:无法获取提供程序com.google.android.gms.ads.MobileAdsInitProvider:java.lang.IollegalStateException:

******************************************************************************
* 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:7244)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6780)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6697)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
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.zzyc.attachInfo(com.google.android.gms:play-services-ads-lite@@19.1.0:33)
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(com.google.android.gms:play-services-ads-lite@@19.1.0:3)
at android.app.ActivityThread.installProvider(ActivityThread.java:7239)
... 10 more

我试图修复它,但没有效果

您是否尝试在AndroidManifest.xml文件的应用程序标记中添加android:usesCleartextTraffic="true"?也可以尝试在应用程序标签上添加<uses-permission android:name="android.permission.INTERNET" />

如果这没有帮助,那么你也可以尝试一下:https://developer.android.com/training/articles/security-config.html

相关内容

最新更新