1

I am doing the react-native Getting Started on a Windows 10 system. I was able to do the react-native init AwesomeProject command to work and now I need to execute:

>react-native run-android

But that fails with this error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> The SDK directory 'C:\Users\plankton\AppData\Local\Android\android-sdk' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 0.64 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

I think the problem is that I have installed the latest Android SDK and now the path is this: C:\Users\plankton\AppData\Local\Android\sdk and NOT C:\Users\plankton\AppData\Local\Android-sdk. If I where on a Unix like OS I would just make a syslink. But I am using Windows 10. What can I do? How do you make syslinks in Windows?

2 Answers 2

3

On Windows it looks at the ANDROID_HOME environment variable. You should be able to just update that, close out the command prompt or powershell and restart it then try again.

Sign up to request clarification or add additional context in comments.

Comments

0

In Android local.properties Inside Change your Sdk Location And solve this issue

1 react-native start --reset-cache

and go to android folder cd android and then clean gradle

2 gradlew clean

and Make Sure Uninstall the Previous app

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.