Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
208 views
in Technique[技术] by (71.8m points)

android - AdMob InterstitialAdd not showing in 8.0.0

java.lang.RuntimeException: Unable to start activity ComponentInfo{bible.bibleinbasicenglish/com.google.android.gms.ads.AdActivity}: java.lang.IllegalStateException: Only fullscreen activities can request orientation
   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: Only fullscreen activities can request orientation
   at android.os.Parcel.readException(Parcel.java:1950)
   at android.os.Parcel.readException(Parcel.java:1888)
   at android.app.IActivityManager$Stub$Proxy.setRequestedOrientation(IActivityManager.java:5675)
   at android.app.Activity.setRequestedOrientation(Activity.java:5739)
   at com.google.android.gms.ads.internal.overlay.m.a(:com.google.android.gms.DynamiteModulesA:553)
   at com.google.android.gms.ads.internal.overlay.m.b(:com.google.android.gms.DynamiteModulesA:626)
   at com.google.android.gms.ads.internal.overlay.m.a(:com.google.android.gms.DynamiteModulesA:341)
   at com.google.android.gms.ads.internal.overlay.client.c.onTransact(:com.google.android.gms.DynamiteModulesA:58)
   at android.os.Binder.transact(Binder.java:604)
   at com.google.android.gms.internal.zzfv$zza$zza.onCreate(Unknown Source:27)
   at com.google.android.gms.ads.AdActivity.onCreate(Unknown Source:24)
   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) 

here is the error log of Interstital ad when open app it will directall crash, i currently test add in the api Level 26, The error like Only fullscreen activities can request orientation , idont know why this is happening.

is there any soluthion for this ? then help me.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

EDIT

the newer (above 16) admob version fixed the issue

Old Answer

add this in your manifest

<activity
  android:name="com.google.android.gms.ads.AdActivity"
  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
  tools:replace="android:theme"
 />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...