React-Native之错误: 找不到或无法加载主类 org.gradle.wrapper.GradleWrapperMain

【声明:】本文是作者(蘑菇v5)原创,版权归作者 蘑菇v5所有,侵权必究。本文首发在。如若转发,请注明作者和来源地址!未经授权,严禁私自转载!

错误信息:

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
 haveset up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

错误原因:

项目未创建完成,就运行了程序

解决办法:

删掉原项目,重新创建,再运行


React-Native之错误: 找不到或无法加载主类 org.gradle.wrapper.GradleWrapperMain_第1张图片
运行成功

你可能感兴趣的:(React-Native之错误: 找不到或无法加载主类 org.gradle.wrapper.GradleWrapperMain)