Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Build Not Working Out of the Box (Paid Version) #72

Open
kylanhurt opened this issue Dec 22, 2020 · 1 comment
Open

Android Build Not Working Out of the Box (Paid Version) #72

kylanhurt opened this issue Dec 22, 2020 · 1 comment

Comments

@kylanhurt
Copy link

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
    }
@kylanhurt
Copy link
Author

kylanhurt commented Apr 6, 2021

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant