React Native android build failed. SDK location not found React Native android build failed. SDK location not found android android

React Native android build failed. SDK location not found


  • Go to the android/ directory of your react-native project
  • Create a file called local.properties with this line:
sdk.dir = /Users/USERNAME/Library/Android/sdk

Where USERNAME is your macOS username


  1. Go to your React-native Project -> Android
  2. Create a file local.properties
  3. Open the file
  4. paste your Android SDK path like below

    • in Windows sdk.dir = C:\\Users\\USERNAME\\AppData\\Local\\Android\\sdk
    • in macOS sdk.dir = /Users/USERNAME/Library/Android/sdk
    • in linux sdk.dir = /home/USERNAME/Android/Sdk

Replace USERNAME with your user name

Now, Run the react-native run-android in your terminal.


You can try adding ANDROID_PATH

export ANDROID_HOME=/Users/<username>/Library/Android/sdk/export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools