Open piscespieces opened 3 years ago
I had same error, if you are generating aab, try use ./gradlew bundleRelease
same error when ./gradlew assembleRelease
./gradlew app:assembleRelease fix this error
@ThanhNguyen140797 Yes, for me the ./gradlew app:assembleRelease
command worked to generate the APK. However when installing the APK in the Android Simulator the app was crashing right away.
Couldn't tell what worked for me because I experimented quite a bit to get it working until I got it to work.
Pretty much uninstalled react-native-orientation
completely and then installed it. Went through the manual linking process again. Also in the build.gradle
file located in node_modules/react-native-orientation/android/build.gradle
made sure to match the compileSdkVersion
and buildToolsVersion
with the one being used in android/build.gradle
.
Then running ./gradlew clean && ./gradlew assembleRelease
did work to generate the APK.
I encountered the same error, but by changing node_modules/react-native-orientation/android/build.gradle
to the following, assembleRelease
completed successfully.
apply plugin: 'com.android.library'
android {
- compileSdkVersion 23
+ compileSdkVersion 28
- buildToolsVersion "23.0.1"
+ buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion 16
- targetSdkVersion 22
+ targetSdkVersion 28
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
dependencies {
compile "com.facebook.react:react-native:+"
}
./gradlew app:assembleRelease fix this error
thanks. its fix my problem
I had same error, if you are generating aab, try use ./gradlew bundleRelease
What that aab mean ? Will it be uploaded in google play store... ?
add this to build.gradle
subprojects {
afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 30
buildToolsVersion = "30.0.3"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}
}
}
Thank you, this one worked!
That solved my issue, thanks
@ThanhNguyen140797 thanx its works for me
In my case the same problem was in parallel task. One task was locking files so the other cannot get access to them. Solved by changing org.gradle.parallel=true ->org.gradle.parallel=false in android/gradle.properties
./gradlew app:assembleRelease fix this error
thanks, its works for me
Thanks bro
Hi 👋 , I Fixed that issue by making the compileSdkVersion , targetSdkVersion minSdkVersion in the build.gradle for library the same as my build.gradle in android floder of my project
When generating the Android APK file for my project I would run in the android folder ./gradlew assembleRelease command.
It would log the following error:
I have successfully gone through the automatic linking setup already. Tried manual and got the same error. I don't know what else to do.