应用程序崩溃InMobi插页式广告

时间:2018-03-12 10:32:48

标签: android crash admob

我遇到插页式广告的问题,当我在Android 8.0上展示插页式广告时,应用会崩溃。在以前的版本,它工作正常。我得到以下例外:



03-12 15:20:25.524 1894-5833/system_process E/ActivityManager: Activity Manager Crash. UID:10085 PID:24871 TRANS:63
                                                               java.lang.IllegalStateException: Only fullscreen activities can request orientation
                                                                   at com.android.server.am.ActivityRecord.setRequestedOrientation(ActivityRecord.java:2198)
                                                                   at com.android.server.am.ActivityManagerService.setRequestedOrientation(ActivityManagerService.java:4947)
                                                                   at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:1101)
                                                                   at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2935)
                                                                   at android.os.Binder.execTransact(Binder.java:674)
03-12 15:20:25.535 24871-24871/com.my.app E/AndroidRuntime: FATAL EXCEPTION: main
                                                                   Process: com.my.app, PID: 24871
                                                                   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.app/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.d.a(:com.google.android.gms.DynamiteModulesA@11947470:182)
                                                                       at com.google.android.gms.ads.internal.overlay.d.b(:com.google.android.gms.DynamiteModulesA@11947470:216)
                                                                       at com.google.android.gms.ads.internal.overlay.d.a(:com.google.android.gms.DynamiteModulesA@11947470:76)
                                                                       at com.google.android.gms.ads.internal.overlay.client.c.onTransact(:com.google.android.gms.DynamiteModulesA@11947470:8)
                                                                       at android.os.Binder.transact(Binder.java:604)
                                                                       at com.google.android.gms.internal.zzeu.zzb(Unknown Source:7)
                                                                       at com.google.android.gms.internal.zzxg.onCreate(Unknown Source:8)
                                                                       at com.google.android.gms.ads.AdActivity.onCreate(Unknown Source:29)
                                                                       at android.app.Activity.performCreate(Activity.java:6975)
                                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)




以下是清单中的InMobiAdActivity:



 <activity
            android:name="com.inmobi.rendering.InMobiAdActivity"
            android:configChanges="keyboardHidden|orientation|keyboard|smallestScreenSize|screenSize|screenLayout"
            android:hardwareAccelerated="true"
            android:resizeableActivity="false"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            tools:ignore="UnusedAttribute" />
&#13;
&#13;
&#13;

有人请帮我解决这个问题。提前致谢

0 个答案:

没有答案