0
I was installing the React Native following the facebook steps, and then when I went to test with the command React-Native run-android happened this error. I’ve set up the android SDK in android studio, but the way it didn’t work, I don’t know what happened, any help I appreciate. my OS is linux manjaro, I’m beginner any mistake forgive me.
[bruno@bruno-pc AwesomeProject]$ sudo react-native run-android
info JS server already running.
info Installing the app...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/home/bruno/AwesomeProject/android/local.properties'.
* 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 1s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/home/bruno/AwesomeProject/android/local.properties'.
* 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 1s
at checkExecSyncError (child_process.js:639:11)
at execFileSync (child_process.js:657:15)
at runOnAllDevices (/home/bruno/AwesomeProject/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/home/bruno/AwesomeProject/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:137:41)
at then.result (/home/bruno/AwesomeProject/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:103:12)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
it’s really I hadn’t done it yet but it hasn’t worked :/
– bruno arndt