I have an issue with installing and running the React-Native Android guide to create AwesomeProject . I am using a Windows 10 environment with Webstorm as my IDE. When ever I run the following command, the emulator fails to launch:
react-native run-android
Here is a screen cap of the Web Storm:
I have all the SDK and JDK configured in my System Environments, this is why I don't the error. Here are the additional steps I took configuring Gradle plugin:
I have googled the issue but the solutions I found were for MacOS users and didn't translate for Windows.
Has anyone come across this issue on Windows and fixed it?
I fixed the issue by installing JDK 8 as listed in the React Native guide. Then updated both the Environment Variables and the gradle.properties
file.
I ONLY GOT IT TO WORK IN ANDROID STUDIO
This seems to have worked for me. But now I got a new error to fix, which basically is that application isn't detecting a device or emulation.
However, to get around that, I have to ensure that I open the AVD Manager and run one of the configured virtual devices prior to executing the command npx react-native run-android
.
This does annoy me having to perform that task first. If anyone knows how to get it to automatically run a default virtual device, that would be nice.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.