我通过删除本地目录等清洗整个项目~/.gradle,~/.m2 ~./android并~/workspace/project/.gradle和艇员选拔File -> Invalidate Caches / Restart...Android Studio中.现在执行命令./gradlew会导致以下输出:
usr$ ./gradlew tasks
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Run Code Online (Sandbox Code Playgroud)
不用说,我删了太多,问题是如何再次修复?你有任何想法如何解决这个问题?
我已经反应原生版本0.42.0.我的项目工作正常.
最近我升级到react-native版本0.43.1.而现在,当我这样做
react-native run-android
Run Code Online (Sandbox Code Playgroud)
我遇到了错误.
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Error: Could not find or load main class 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
Run Code Online (Sandbox Code Playgroud)
我已按照https://facebook.github.io/react-native/docs/upgrading.html的升级说明进行操作
我用谷歌搜索了这个问题.通过以下链接,没有一个对我有用.
任何形式的帮助/指导对我都有帮助.