Android Question Error Orientation with ANDROID 8 Api 26

Discussion in 'Android Questions' started by wizard699, Aug 10, 2018.

  1. wizard699

    wizard699 Active Member Licensed User

    On some smartphone wit API 26 and Android 8, the app close reporting in log this error

    Caused by java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation
    android.app.Activity.onCreate (Activity.java:1038)
    in.raguso.educom.main.onCreate (main.java:33)
    android.app.Activity.performCreate (Activity.java:7174)
    android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220)
    android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908)
    android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
    android.app.ActivityThread.-wrap11 ()
    android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
    android.os.Handler.dispatchMessage (Handler.java:105)
    android.os.Looper.loop (Looper.java:164)
    android.app.ActivityThread.main (ActivityThread.java:6938)
    java.lang.reflect.Method.invoke (Method.java)
    com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
    com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

    The error seems linked to Main module, the supported Orientations settings and the definition, in Manifest
    SetActivityAttribute(main, android:theme, @android:style/Theme.Translucent.NoTitleBar)

    Someone have the same problem?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Seems like a new limitation in Android 8+. Only non-transparent activities can force the orientation to change.
     
  3. Semen Matusovskiy

    Semen Matusovskiy Active Member Licensed User

    Did you try targetSdkVersion=26 ? (Guess, you set targetSdkVersion=27)
     
  4. wizard699

    wizard699 Active Member Licensed User

    Yes, in fact.
    I will try with sdk=26
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice