午餐时显示示例广告导致应用崩溃

时间:2019-02-23 16:54:55

标签: android googlemobileads

02/23 21:40:03: Launching app
$ adb push C:\Users\LENOVO\AndroidStudioProjects\ShowAd\app\build\outputs\apk\debug\app-debug.apk /data/local/tmp/com.example.showad
$ adb shell pm install -t -r "/data/local/tmp/com.example.showad"
    pkg: /data/local/tmp/com.example.showad
Success
APK installed in 10 s 245 ms
$ adb shell am start -n "com.example.showad/com.example.showad.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 9606 on device sony-d2302-ZH8005FCL0
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/dalvikvm: Could not find method android.content.pm.PackageManager.isInstantApp, referenced from method com.google.android.gms.common.wrappers.PackageManagerWrapper.isCallerInstantApp
W/dalvikvm: VFY: unable to resolve virtual method 951: Landroid/content/pm/PackageManager;.isInstantApp (Ljava/lang/String;)Z
D/dalvikvm: VFY: replacing opcode 0x6e at 0x002e
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41632d88)
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.showad, PID: 9606
    java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException: 

    ******************************************************************************
    * Invalid application ID. Follow instructions here: 
    * find your app ID.                                                          *
    ******************************************************************************


        at android.app.ActivityThread.installProvider(ActivityThread.java:4987)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4563)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4503)
        at android.app.ActivityThread.access$1500(ActivityThread.java:144)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5212)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.IllegalStateException: 

    ******************************************************************************
    * Invalid application ID. Follow instructions here:  *
    * find your app ID.                                                          *
    ******************************************************************************


        at com.google.android.gms.internal.ads.zzze.attachInfo(Unknown Source)
        at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source)
        at android.app.ActivityThread.installProvider(ActivityThread.java:4969)
            ... 12 more
Application terminated.

0 个答案:

没有答案