I have error when i start running android
What went wrong: A problem occurred evaluating project ':app'. > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
Close the current project and you'll see a pop-up with a dialog which will then proceed to Configure option. Configure -> Project Defaults -> Project Structure -> SDKs on left column -> Android SDK Home Path -> give the exact path as you did on local. properties and select Valid Target.
By going to File > Settings > Appearance & Behavior > System Settings > Android SDK, you can find the SDK location setting at the top with the option to change, and the default folder being ~/Android/Sdk.
On a machine with Android Studio installed, click Tools > Android > SDK Manager. At the top of the window, note the Android SDK Location.
by default, the "Android Studio IDE" will be installed in " C:\Program Files\Android\Android Studio ", and the "Android SDK" in " c:\Users\username\AppData\Local\Android\Sdk ".
android/
directory of your react-native projectlocal.properties
with this line:sdk.dir = /Users/USERNAME/Library/Android/sdk
Where USERNAME
is your macOS username
local.properties
paste your Android SDK path like below
sdk.dir = C:\\Users\\USERNAME\\AppData\\Local\\Android\\sdk
sdk.dir = /Users/USERNAME/Library/Android/sdk
sdk.dir = /home/USERNAME/Android/Sdk
Replace USERNAME
with your user name
Now, Run the react-native run-android
in your terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With