-1

i am new to react native and an trying to run the project on emmulator "react-native run-android" . iam getting the error.

* What went wrong:
A problem occurred configuring project ':app'.
> The SDK directory 'D:\ReactNativeLearning\zupportdeskchat\ZDReactNative\zupportdeskapp\android\"D:\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: 5.253 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

My Sdk Folder is in

sdk.dir ="D:/Android/sdk"

I set it up in local.properties.

Can someone help me to fix this tnx.

Sathya Baman
  • 3,424
  • 7
  • 44
  • 77
  • are you running it on windows? try: *sdk.dir = D\:\\Android\\sdk* this might help: https://stackoverflow.com/questions/32634352/react-native-android-build-failed-sdk-location-not-found – Kristo J Jun 14 '17 at 06:22

2 Answers2

1

You are getting this error because you haven't connected a device or opened the emulator. So first connect the device to the machine and try react-native run-android or run the emulator and enter react-native run-android

Jeffrey Rajan
  • 4,391
  • 4
  • 27
  • 37
1

If you are working on windows system then path should be:

sdk.dir=D\:\\Projects\\Android\\sdk

Clear build cache and npm cache then try to make build.

Also check, your device is connected or not.

Jigar Shah
  • 6,143
  • 2
  • 28
  • 41