错误信息:
D:\project\React\React Native\FirstApp>react-native run-android
Scanning folders
for
symlinks
in
D:\project\React\React Native\FirstApp\node_modules (21ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
错误: 找不到或无法加载主类 org.gradle.wrapper.GradleWrapperMain
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
原因:
其原因是在创建项目时,未创建完成就运行了程序,解决办法是删掉原项目重新创建,耐心等待,等创建完成后在运行