1

I'm trying to run my React-native app "Android" but in every single time before i add the SDK path inside project files manually like this

local.properties

sdk.dir=/Users/USERNAME/Library/Android/sdk

RN Error

  • 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 '/Volumes/..../.../.../.../android/local.properties'.

but that's tired if i want to do it in every single project i work for it

I'm Seen these answers but no one works for me

and here my .bash_profile => nano ~/.bash_profile

enter image description here

So What's Wrong I made?

Oliver D
  • 2,579
  • 6
  • 37
  • 80

1 Answers1

0

Firstly according to the error you posted, ANDROID_SDK_ROOT variable should be defined. In your bash_profile you have defined ANDROID_HOME.

Secondly verify that SDK exists in the specified path with correct rights.

Nullish Byte
  • 354
  • 2
  • 10
  • Yes the path is correct, I try both `ANDROID_SDK_ROOT& ANDROID_HOME` no one works – Oliver D Jan 28 '20 at 19:08
  • you also have to restart the terminal for change in environment variables to take effect. – Nullish Byte Jan 28 '20 at 22:01
  • I already restart the terminal and my pc too :) but not works :( – Oliver D Jan 29 '20 at 09:18
  • According to [this answer](https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil), the project might be missing a settings.gradle file. ``` include ':app' ``` – Nullish Byte Jan 29 '20 at 18:47