无法确定包装器版本

Could not determine wrapper version

我创建了一个 React Native 应用程序,只需执行以下操作:

react-native init app

我已经学习了这个教程:Facebook Getting Started (I use Linux)

而且我完全按照它说的做了。

但是,当我尝试 运行 应用程序 (react-native run-android) 时,我收到以下消息:

Starting JS server... Building and installing the app on the device (cd android && ./gradlew installDebug)... Exception in thread "main" java.lang.RuntimeException: Could not determine wrapper version. at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:111) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: java.lang.RuntimeException: No build receipt resource found. at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:97) ... 1 more 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 ```

我该如何解决这个问题?

据此link https://github.com/MinecraftForge/ForgeGradle/issues/227 这是因为您的项目路径中有一些特殊字符(如“!”)