Please update ../android/build.gradle file and replace code with this for higher Android versions
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
}
apply plugin: 'com.android.library'
def _ext = rootProject.ext
def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+'
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 27
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '27.0.3'
def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 16
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 27
android {
compileSdkVersion _compileSdkVersion
buildToolsVersion _buildToolsVersion
defaultConfig {
minSdkVersion _minSdkVersion
targetSdkVersion _targetSdkVersion
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}
dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:${_reactNativeVersion}"
}
I have set up a project last week with latest version of react native (Android SDK version 27) and have the same issue.
In my opinion this will help to solve version incompatibility.
Use a fork react-native-orientation-locker with normal support ! :+1:
@retyui I uninstall react-native-orientation and install react-native-orientation-locker and works fine for me, thank you.
Most helpful comment
Use a fork react-native-orientation-locker with normal support ! :+1: