Reputation: 69
I've built a react native app on windows when ever i'm trying to run it on mac it gives me a error. only when i try to run android it shows me this error, ios is running perfect. and after i build this on mac, this wont run even in the windows system it was previously coded on.
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)
Upvotes: 1
Views: 1088
Reputation: 426
You don't have permission to execute ./gradle
Run the following command at the project root directory
chmod 755 android/gradlew
Upvotes: 5