1
votes

operating system: Ubuntu 18.04 lts I'm using vscode 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/myworldsoftware-u/İndirilenler/project2/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

BUİLD FAILED in 8s

at checkExecSyncError (child_process.js:601:13)
at execFileSync (child_process.js:621:13)
at runOnAllDevices (/home/myworldsoftware-u/İndirilenler/project2/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:74:39)
at buildAndRun (/home/myworldsoftware-u/İndirilenler/project2/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at then.result (/home/myworldsoftware-u/İndirilenler/project2/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
1

1 Answers

3
votes

Had the same issue when I cloned a react-native repo to Linux and tried to run the app in the emulator. First is to have all your environment up and running. If that is the case, for me it was the permission issue for the gradlew file. Go to the android folder in your app and:

chmod +x gradlew
Badmus TaofeeqClone and run react native projects from GitHub