Open harikanammi opened 6 years ago
@harikanammi Did you find any solution?
@GoshaEgorian, Please follow the manual linking of android. I think It will be helpful to you. https://github.com/yamill/react-native-orientation (or) can u check this once..... https://github.com/react-native-community/react-native-svg/issues/585
@harikanammi If you see into node_modules/react-native-orientation/android/build.gradle, you see that:
######### apply plugin: 'com.android.library'
android { compileSdkVersion 23 buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
dependencies { compile "com.facebook.react:react-native:+" } #########
I changed it to: ######### apply plugin: 'com.android.library'
android { compileSdkVersion 26 buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
}
dependencies { implementation 'com.android.support:appcompat-v7:26.0.2' compile "com.facebook.react:react-native:+" } #########
And this worked for me
@Luisda199824 Thanks. It works for me.
@Luisda199824 thanks.
Other solution:
Add subprojects {}
to android/build.gradle
:
buildscript {
ext {
buildToolsVersion = "27.0.3" // version of build tool used for project
minSdkVersion = 16
compileSdkVersion = 27 // version of compile sdk used for project
targetSdkVersion = 26
supportLibVersion = "27.1.1"
}
repositories {
...
}
dependencies {
...
}
}
allprojects {
...
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27 // version of compile sdk used for project
buildToolsVersion '27.0.3' // version of build tool used for project
}
}
}
}
task wrapper(type: Wrapper) {
...
}
@nuocgansoi solution worked for me!
This repo dead , use the fork https://github.com/wonday/react-native-orientation-locker
Another Solution:
Use ./gradlew app:assembleRelease
Another Solution: Use
./gradlew app:assembleRelease
Hi Could you please explain why is this working ?
Another Solution: Use
./gradlew app:assembleRelease
Hi, would you mind providing some details about why this works? But grandlew assembleRelease
doesn't.
only updating too:
compileSdkVersion 28
buildToolsVersion "28.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
with the rest of @Luisda199824 update worked for me
Since Google now forces everyone to use SDK version 29, this repo is indeed not usable anymore sadly.
@nuocgansoi insan değilsin melek melek. thx my friend
Hi, i am running sample application. I am using this module it's working fine in iOS and Android. My question is..... when i build an apk file in android i am getting error like below image. Please give me any suggestion. Thank you in advance.