Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation #24

Closed
duanhong169 opened this issue May 28, 2018 · 4 comments

Comments

@duanhong169
Copy link

Crashed on API 26:

05-28 15:30:00.872 20619 20619 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/me.ele.uetool.TransparentActivity}: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3194)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.ActivityThread.-wrap12(Unknown Source:0)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:108)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:166)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7425)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.Activity.onCreate(Activity.java:1081)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.support.v4.app.SupportActivity.onCreate(SupportActivity.java:66)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:321)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:84)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at me.ele.uetool.TransparentActivity.onCreate(TransparentActivity.java:32)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7372)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3147)
05-28 15:30:00.872 20619 20619 E AndroidRuntime: 	... 9 more
@JeasonWong
Copy link
Collaborator

what's your targetSdkVersion ?

@duanhong169
Copy link
Author

compileSdkVersion 27
minSdkVersion 21
targetSdkVersion 27

@JeasonWong
Copy link
Collaborator

please edit build.gradle 's targetSdkVersion and try to run UETool lasted demo, is it crash again?

@duanhong169
Copy link
Author

It seems that this crash has been fixed in 1.0.15, only crashed with release 1.0.14.
I think the cause is:

android:screenOrientation="portrait"

which has been removed in 1.0.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants