简体   繁体   English

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

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

I've built a react native app on windows when ever i'm trying to run it on mac it gives me a error.当我尝试在 mac 上运行它时,我已经在 Windows 上构建了一个 react native 应用程序,它给了我一个错误。 only when i try to run android it shows me this error, ios is running perfect.只有当我尝试运行 android 时,它才会向我显示此错误,ios 运行正常。 and after i build this on mac, this wont run even in the windows system it was previously coded on.在我在 mac 上构建它之后,即使在它之前编码的 Windows 系统中也不会运行。

error:-错误:-

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)

You don't have permission to execute ./gradle您无权执行 ./gradle

Run the following command at the project root directory在项目根目录下运行以下命令

chmod 755 android/gradlew chmod 755 安卓/gradlew

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

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