eu estava instalando o react native seguindo os passos do facebook, e aí quando fui testar com o comando react-native run-android aconteceu esse erro. já configurei o android SDK no android studio, mas pelo jeito não funcionou, não sei oque aconteceu, qualquer ajuda eu agradeço. meu SO é o linux manjaro, sou iniciante qualquer erro me perdoem.
[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)