如何解决Square Reader SDK Demo (React Native / Mac) - 错误:spawn ./gradlew ENOENT
我使用以下软件版本:
(Mac OS Big Sur)
react-native-cli: 2.0.1
react-native: 0.64.1
yarn: 1.22.10
android-sdk: 29.0.3
javac: 16.0.2
我正在尝试从 https://github.com/square/react-native-square-reader-sdk/tree/master/reader-sdk-react-native-quickstart 运行演示。所有文件都与此演示中的文件几乎相同(唯一的区别是建议使用我的凭据插入 gradle.properties
中的新行)。
我成功传递了 npx @react-native-community/cli doctor
命令(我设置了 ANDROID_HOME
,我有正确的 JDK 和 Android SDK 等......)。我目前正在使用外部 Android 设备测试我的软件。
当我在主目录中运行 react-native run-android
时,这是我的回溯:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:6673) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 903 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: spawn ./gradlew ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:480:16)
at processticksAndRejections (node:internal/process/task_queues:83:21)
info Run CLI with --verbose flag for more details.
我的 gradew.bat
目录中有 /android
,这令人困惑,因为它似乎是大多数“gradlew”问题的来源。
React Native Error: spawn gradlew.bat ENOENT 的解决方案不起作用,因为 tns install
产生以下输出:
No project found at or above '/Users/myuser/Documents/GitHub/react-native-square-reader-sdk' and neither was a --path specified.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。