当我在模拟器中尝试应用程序时,出现“不幸的是,应用程序已停止”错误消息

时间:2019-04-25 14:24:47

标签: java android

我通过android studio制作了一个android应用程序,它成功编译,但是当我在模拟器上尝试它时,出现以下错误消息: “很遗憾,应用已停止” 谁能帮我吗?

LogCat:

04-25 15:19:26.613 5309-5309/? I/art: Late-enabling -Xcheck:jni
04-25 15:19:27.446 5309-5309/com.coolclassicgamehandwarriorsepicbattleshoeshoot2playerbeatchildhoodplayfamilyfriendsagainstcomputerrpsboardrockpaperscissorss D/AndroidRuntime: Shutting down VM
04-25 15:19:27.447 5309-5309/com.coolclassicgamehandwarriorsepicbattleshoeshoot2playerbeatchildhoodplayfamilyfriendsagainstcomputerrpsboardrockpaperscissorss E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.coolclassicgamehandwarriorsepicbattleshoeshoot2playerbeatchildhoodplayfamilyfriendsagainstcomputerrpsboardrockpaperscissorss, PID: 5309
    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:  to add a valid  *
    * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
    * follow instructions here: .                           *
    ******************************************************************************


        at android.app.ActivityThread.installProvider(ActivityThread.java:5041)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4633)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4573)
        at android.app.ActivityThread.access$1500(ActivityThread.java:153)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5293)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.IllegalStateException: 

    ******************************************************************************
    * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
    * should follow the instructions here:  to add a valid  *
    * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
    * follow instructions here: .                           *
    ******************************************************************************


        at com.google.android.gms.internal.ads.zzabg.attachInfo(Unknown Source)
        at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source)
        at android.app.ActivityThread.installProvider(ActivityThread.java:5038)
            ... 11 more
04-25 15:19:30.305 5309-5309/com.coolclassicgamehandwarriorsepicbattleshoeshoot2playerbeatchildhoodplayfamilyfriendsagainstcomputerrpsboardrockpaperscissorss I/Process: Sending signal. PID: 5309 SIG: 9

1 个答案:

答案 0 :(得分:0)

在AndroidMenifest.xml文件中更改主题名称

android-> manifest->然后更改为android:theme =“ @ style / AppTheme”