繁体   English   中英

React本机Android应用程序构建不在Mac上运行

[英]React native android app build not running on mac

当我尝试在 mac 上运行它时,我已经在 Windows 上构建了一个 react native 应用程序,它给了我一个错误。 只有当我尝试运行 android 时,它才会向我显示此错误,ios 运行正常。 在我在 mac 上构建它之后,即使在它之前编码的 Windows 系统中也不会运行。

错误:-

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.

Error: spawnSync ./gradlew EACCES
at Object.spawnSync (internal/child_process.js:1041:20)
at spawnSync (child_process.js:607:24)
at execFileSync (child_process.js:634:15)
at runOnAllDevices (/Users/ideenkreise/Documents/GoalMate/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)

at buildAndRun (/Users/ideenkreise/Documents/GoalMate/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at /Users/ideenkreise/Documents/GoalMate/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (/Users/ideenkreise/Documents/GoalMate/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:164:9)

您无权执行 ./gradle

在项目根目录下运行以下命令

chmod 755 安卓/gradlew

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM