ParkSangGwon / TedPermission

Easy check permission library for Android Marshmallow
1.74k stars 239 forks source link

In Oreo os 8.0.0. Device: SM-N950F gettting the crash #88

Closed hardikpatel679 closed 6 years ago

hardikpatel679 commented 6 years ago

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6940) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

hardikpatel679 commented 6 years ago

just change the style <item name="android:windowIsTranslucent">true</item> to <item name="android:windowIsTranslucent">false</item> Its works for me

ps-jimmy commented 6 years ago

This solution works for me, just add it to your manifest file: <activity android:name="com.gun0912.tedpermission.TedPermissionActivity" android:configChanges="mcc|mnc|locale|keyboard|keyboardHidden|screenLayout|fontScale|uiMode|orientation|screenSize|layoutDirection" android:screenOrientation="unspecified" android:theme="@style/Theme.Transparent.Permission" tools:replace="android:screenOrientation"/>

ParkSangGwon commented 6 years ago

This issue solved at #74

Jitesh1720 commented 6 years ago

This issue solved at #74

I still facing this issue. <item name="android:windowIsTranslucent">false</item>

Applied this in theme/style

is the issue related with orientation ? currently my project orientation is landscape android:screenOrientation="landscape"

hardikpatel679 commented 6 years ago

Bro if you had written orientation in Mimifirst file then remove it and check

On Wed, 12 Sep 2018, 9:50 pm Jitesh Prajapati, notifications@github.com wrote:

This issue solved at #74 https://github.com/ParkSangGwon/TedPermission/pull/74

I still facing this issue.

false

Applied this in theme/style

is the issue related with orientation ? currently my project orientation is landscape

android:screenOrientation="landscape"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ParkSangGwon/TedPermission/issues/88#issuecomment-420710100, or mute the thread https://github.com/notifications/unsubscribe-auth/AkaWJDBYWHqwwe2Tu9Zk-5tvlCeyFyH3ks5uaTRbgaJpZM4TySA6 .

Jitesh1720 commented 6 years ago

Yeah right. if I remove orientation from manifest then its working. But It compulsory for my app so I just update version to 2.2.2 and ArrayList to List. Now its working in Oreo with screen orientation in manifest.

@Override
        public void onPermissionDenied(ArrayList<String> deniedPermissions) {
        }
@Override
        public void onPermissionDenied(List<String> deniedPermissions) {
        }

Anyway. Thanks for your support.

hardikpatel679 commented 6 years ago

Issue is that if you use transperent activity then do not provide orientation in milifirst file in Oreo.

On Wed, 12 Sep 2018, 10:14 pm Jitesh Prajapati, notifications@github.com wrote:

Yeah right. if I remove orientation from manifest then its working. But It compulsory for my app so I just update version to 2.2.2 and ArrayList to List. Now its working in Oreo with screen orientation in manifest.

@Override public void onPermissionDenied(ArrayList deniedPermissions) { }

@Override public void onPermissionDenied(List deniedPermissions) { }

Anyway. Thanks for your support.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ParkSangGwon/TedPermission/issues/88#issuecomment-420717764, or mute the thread https://github.com/notifications/unsubscribe-auth/AkaWJC5PoDtlyFnCLKWOXjpe3oRiJjFFks5uaToKgaJpZM4TySA6 .