我尝试将admob广告整合到我的Android游戏中,没有广告游戏工作正常,但广告一直在关闭开始。
这是logcat:
java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called.
at com.google.android.gms.internal.zzmw.zza(Unknown Source:20)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source:6)
at com.google.android.gms.ads.AdView.loadAd(Unknown Source:0)
at com.secrethq.ads.PTAdAdMobBridge$1.run(PTAdAdMobBridge.java:72)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6798)
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)
我能帮到这里吗?