无法确定包装器版本 [英] Could not determine wrapper version

查看:99
本文介绍了无法确定包装器版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've created a react native app, by simply doing:

react-native init app

我遵循了本教程:Facebook 入门(我使用Linux)

而且我完全按照它所说的去做.

and I have done exactly what it says.

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

However, when I try to run the app (react-native run-android), I got the following message:

正在启动JS服务器...在设备上构建和安装应用程序 (cd android && ./gradlew installDebug)...线程main"中的异常 java.lang.RuntimeException:无法确定包装器版本.在 org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:111)在 org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)引起:java.lang.RuntimeException:未找到构建收据资源.在 org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:97)... 1 更多无法在设备上安装该应用程序,请阅读上面的错误以了解详细信息.确保您有一个正在运行的 Android 模拟器或已连接的设备设置你的 Android 开发环境:https://facebook.github.io/react-native/docs/android-setup.html```

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 ```

我该如何解决这个问题?

How can I solve this problem?

推荐答案

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

According to this link https://github.com/MinecraftForge/ForgeGradle/issues/227 it's because you have some special character in your project path (like "!")

这篇关于无法确定包装器版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆