Fuse Community

Android 8.0 and the 'portrait' bug

I has been reported (here and here) that a app won’t start, will crash or won’t install under Android 8.0. A possibile cause is the portrait bug.

When in .unoconfig it is specified

"Mobile": {
    "Orientations": "Portrait"
},

the app will crash or won’t install. The bug may be solved by setting to false the string

<item name="android:windowIsTranslucent">true</item>

in

styles.xml

Unfortunately as of Uno 1.12.1 there is no easy way to fix it changing Uno libs. Changing the file that may be found in the folder

C:\Users\_user_\AppData\Roaming\npm\node_modules\fuse-sdk\node_modules\@fuse-open\uno\lib\build\UnoCore\1.12.1\Targets\Android\app\src\main\res\values

won’t work. The easiest way is to rebuild the app with Android Studio:

  1. Build a release version of your app
  2. Load the app in Android Studio as a project
  3. In the left pane open the folder /app/res/values and click on styles.xml
  4. Set windowIsTranslucent to false
  5. Build the app and grab the APK file from the /app/release/ folder in the /Release of your Fuse project
  6. If you want to Generate a signed APK choose V1 signature when asked