question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RN 0.58 + Android target SDK 27 = Problem with orientation locker

See original GitHub issue

Hi,

its looks like that Android by SDK 27 and up change ability to locking screen which are not fullscreen. It is only issue when target SDK is set to 27, which is default in RN 0.58. But when is compiled with target SDK 26 it works. Error: Issue: java.lang.IllegalStateException: Only fullscreen activities can request orientation

Any hints how to fix it without any complex solution ? Maybe add oneliner into AndroidManifest.xml ?

Same issues in different repositories https://github.com/Instabug/Instabug-Android/issues/68 https://github.com/ParkSangGwon/TedPermission/issues/63

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
radenocommented, Mar 1, 2019

Simple working fix is disabling translucent feature in file android/app/src/main/res/values/styles.xml replace:

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

to

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

Maybe this can be noticed in Readme file.

It is bug just for Android 8.0.

5reactions
asfreng-returnscommented, Mar 25, 2019

Im having the same issue with RN 0.59.0 and SDK 28

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-orientation-locker - npm
A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.
Read more >
A react-native module that can listen on orientation changing ...
A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation. (cross-platform support)
Read more >
Cannot build Android Version of my App due to react-native ...
Try using patch-package. The problem is that on gradlew 7, 'compile' keyword is deprecated in favor of 'implementation'.
Read more >
react-native-orientation - Bountysource
Aapt2Exception: Android resource linking failed error: resource ... targetSdkVersion : 27 android { compileSdkVersion _compileSdkVersion buildToolsVersion ...
Read more >
Why Android Studio Emulator Is Upside Down When Rotating ...
. that can listen on orientation changing of device get current orientation lock to preferred orientation. RN 0.58 + Android target SDK 27...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found