react-native-starter
react-native-starter copied to clipboard
Android Build Not Working Out of the Box (Paid Version)
I assume it must just be something wrong with my build but I keep getting this error message when I run react-native run-android. My best guess is that it has something to do with the NDK or SDK version but I upgraded both and am still running into the problem. I am using react-native-starter v2.1.0. Any help would be appreciated:
196 actionable tasks: 2 executed, 194 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
> A problem occurred starting process 'command '/Users/kylan/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Relevant build.gradle:
buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 29
}
For the record it was fixed by moving the NDK bundle:
cd /Users/[your_user]/Library/Android/sdk
mv ndk-bundle ndk-bundle_old
Then make the following change to the applicationId in android/app/build.gradle in your project:
- applicationId "com.reactnativestarter.upd"
+ applicationId "com.reactnativestarter"