java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.TomGarden.tetris/io.github.TomGarden.GenerateRevenue.GoogleAdMod}: java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called. #41
/*Device Info*/
[硬]设备制造商=Genymotion
[硬]设备型号=Custom
[硬]CPU型号=null
[硬]RAM=1.04 GB
[硬]ROM=13.38 GB
[OS][三方定制系统版本]=Android/vbox86p/vbox86p:8.0.0/OPR6.170623.017/32:userdebug/test-keys
[OS]产品名称(adb shell)=vbox86p
[OS][系统名称]=Android
[OS][Android版本]=8.0.0(26)
[app]versionName=1.0
[app]versionCode=1
/*Exception*/
java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.TomGarden.tetris/io.github.TomGarden.GenerateRevenue.GoogleAdMod}: java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called.
at com.google.android.gms.internal.ads.zzyz.zza(Unknown Source:80)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source:15)
at com.google.android.gms.ads.AdView.loadAd(Unknown Source:18)
at io.github.TomGarden.GenerateRevenue.GoogleAdMod.initView(GoogleAdMod.java:55)
at io.github.TomGarden.GenerateRevenue.GoogleAdMod.onCreate(GoogleAdMod.java:38)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
... 9 more
java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called.
at com.google.android.gms.internal.ads.zzyz.zza(Unknown Source:80)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source:15)
at com.google.android.gms.ads.AdView.loadAd(Unknown Source:18)
at io.github.TomGarden.GenerateRevenue.GoogleAdMod.initView(GoogleAdMod.java:55)
at io.github.TomGarden.GenerateRevenue.GoogleAdMod.onCreate(GoogleAdMod.java:38)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)