Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript React native中的SDK错误_Javascript_Android_Reactjs_React Native - Fatal编程技术网

Javascript React native中的SDK错误

Javascript React native中的SDK错误,javascript,android,reactjs,react-native,Javascript,Android,Reactjs,React Native,我是react native的新手,正在尝试在emmulator“react native run android”上运行该项目。我发现了这个错误 * What went wrong: A problem occurred configuring project ':app'. > The SDK directory 'D:\ReactNativeLearning\zupportdeskchat\ZDReactNative\zupportdeskapp\android\"D:\Androi

我是react native的新手,正在尝试在emmulator“react native run android”上运行该项目。我发现了这个错误

* 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
我的Sdk文件夹在中

sdk.dir ="D:/Android/sdk"
我在local.properties中设置了它


有人能帮我修复这个tnx吗。

您遇到这个错误是因为您没有连接设备或打开模拟器。因此,首先将设备连接到计算机,然后尝试
react native run android
,或者运行模拟器并输入
react native run android
,如果您在windows系统上工作,则路径应为:

sdk.dir=D\:\\Projects\\Android\\sdk
清除生成缓存和npm缓存,然后尝试生成


还要检查设备是否已连接。

是否在windows上运行?try:sdk.dir=D\:\\Android\\sdk这可能会有帮助: