0

Trying to launch new project and getting this error.

  • What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

    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/mobii/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.

    BUILD FAILED in 2s

    at makeError (/home/mobii/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
    at /home/mobii/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (/home/mobii/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
    at async Command.handleAction (/home/mobii/node_modules/@react-native-community/cli/build/index.js:192:9)
    
  • You have to set your Java SDK Path. Check this https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil – Voidy Jul 21 '22 at 09:54
  • Does this answer your question? [SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID\_HOME environment variable](https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil) – Voidy Jul 21 '22 at 09:55
  • I tried adding a local.properties file - in linux sdk.dir = /home/USERNAME/Android/Sdk and didn't worked. – ANKUSHSRJ Jul 21 '22 at 09:59
  • Try to put it in your system path variables – Voidy Jul 22 '22 at 06:51

0 Answers0