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 (
    in.raguso.educom.main.onCreate ( ( ( ( ( ()$H.handleMessage (
    android.os.Handler.dispatchMessage (
    android.os.Looper.loop ( (
    java.lang.reflect.Method.invoke ($ ( (

    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
  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