Questions tagged «android-8.1-oreo»

30
java.lang.IllegalStateException:仅全屏不透明活动可以请求方向
从Android 8.0 Oreo java.lang.IllegalStateException中的通讯录中检索联系人时,我遇到了问题:仅全屏不透明活动可以请求定向 我正在尝试从电话通讯录中获取我的活动中的联系人,它非常适合棒棒糖,棉花糖,牛轧糖等,但对于奥利奥这样的错误会给我带来这种错误,请帮助我。我的代码在这里。 演示代码: private void loadContacts() { contactAsync = new ContactLoaderAsync(); contactAsync.execute(); } private class ContactLoaderAsync extends AsyncTask<Void, Void, Void> { private Cursor numCursor; @Override protected void onPreExecute() { super.onPreExecute(); Uri numContacts = ContactsContract.CommonDataKinds.Phone.CONTENT_URI; String[] numProjection = new String[]{ContactsContract.CommonDataKinds.Phone.CONTACT_ID, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE}; if (android.os.Build.VERSION.SDK_INT < 11) { …

7
插页式Admob广告:“ IllegalStateException:仅全屏活动可以请求定向”
背景 我有一个使用了Admob SDK的应用,可以显示插页式广告(全屏广告)。 最近,Google已更新了SDK,以及许多其他东西(构建工具,gradle插件,IDE等),包括admob(firebase广告)。 compile 'com.google.firebase:firebase-ads:11.4.2' 问题 更新后,我注意到,只要该应用尝试展示插页式广告,它就会崩溃。 崩溃日志如下: 10-28 14:01:01.394 4523-4523/... I/Ads: Ad opening. 10-28 14:01:01.400 1606-2154/? E/ActivityManager: Activity Manager Crash. UID:10080 PID:4523 TRANS:63 java.lang.IllegalStateException: Only fullscreen activities can request orientation at com.android.server.am.ActivityRecord.setRequestedOrientation(ActivityRecord.java:2189) at com.android.server.am.ActivityManagerService.setRequestedOrientation(ActivityManagerService.java:4975) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:1101) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2927) at android.os.Binder.execTransact(Binder.java:697) 10-28 14:01:01.403 4523-4523/... D/AndroidRuntime: Shutting down VM 10-28 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.