Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.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
Android React Native WebStorm Emulator无法启动-启动Emulator时出错。原因:未找到作为“emulator-list AVD”输出的仿真器`_Android_React Native_Android Emulator_Webstorm_Emulation - Fatal编程技术网

Android React Native WebStorm Emulator无法启动-启动Emulator时出错。原因:未找到作为“emulator-list AVD”输出的仿真器`

Android React Native WebStorm Emulator无法启动-启动Emulator时出错。原因:未找到作为“emulator-list AVD”输出的仿真器`,android,react-native,android-emulator,webstorm,emulation,Android,React Native,Android Emulator,Webstorm,Emulation,我是WebStorm新手,React Native,在设置我的环境时遇到了一个错误,与我看到的其他帖子相比,这个错误显得很独特 客观的 我在WebStorm中设置了一个默认项目,我的目标是在Android仿真器上运行该项目,我使用的是Windows PC 我试过的 我在WebStorm中设置了一个简单的调试配置 我还通过Android Studio下载了一个Android模拟器,并在我的电脑上运行 现在,当我单击调试仿真器的run时,出现以下错误: info Running jetifier

我是WebStorm新手,React Native,在设置我的环境时遇到了一个错误,与我看到的其他帖子相比,这个错误显得很独特

客观的 我在WebStorm中设置了一个默认项目,我的目标是在Android仿真器上运行该项目,我使用的是Windows PC

我试过的 我在WebStorm中设置了一个简单的调试配置

我还通过Android Studio下载了一个Android模拟器,并在我的电脑上运行

现在,当我单击调试仿真器的run时,出现以下错误:

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
'adb' is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator...
infoerror Installing the app... 
Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\Nicol\WebstormProjects\Dog\android\local.properties'.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 13s

Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\Nicol\WebstormProjects\Dog\android\local.properties'.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 13s

    at checkExecSyncError (child_process.js:621:11)
    at execFileSync (child_process.js:639:15)
    at runOnAllDevices (C:\Users\Nicol\WebstormProjects\Dog\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
其他资料 下面是我的路径系统变量的图片:


adb
不在您的
%PATH%
上;确保添加
adb.exe
所在的文件夹(通常
$ANDROID\u HOME/platform tools
,其中
$ANDROID\u HOME
是您的ANDROID SDK安装目录,通常
C:\Users\your.Name\AppData\Local\ANDROID\SDK
,您可以在Windows cmd控制台中运行
where adb
命令来查找它)转到系统环境变量下的
%PATH%
,然后重新启动WebStorm


您还需要根据错误消息中的建议定义
%ANDROID\u SDK\u ROOT%
环境变量

只需添加,windows环境变量区分大小写,添加
%LOCALAPPDATA%\ANDROID\SDK
就像react本地网站所说的那样将不起作用,您还需要添加
%LOCALAPPDATA%\ANDROID\SDK
,如果你看不到你的AppData文件夹,给所有新手一个建议。在文件资源管理器中,转到查看->并选中隐藏文件框。这是一个隐藏的文件夹。