ionicthemes / ion2fullapp

This is our public repository for customers to report bugs about Ion2FullApp - Ionic Template

Home Page:https://ionicthemes.com/product/ion2fullapp-full-ionic2-app-template-elite-version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova run android error: UnhandledPromiseRejectionWarning: Error: spawn EACCES

sandrhymend opened this issue · comments

I removed it.
ionic cordova platform rm android

and I recreated it but I got this error

smendoza$ cordova run android
Discovered plugin "call-number" in config.xml. Adding it to the project
Plugin "mx.ferreyra.callnumber" already installed on android.
ANDROID_HOME=/Users/smendoza/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
(node:78984) UnhandledPromiseRejectionWarning: Error: spawn EACCES
at _errnoException (util.js:992:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at Object.exports.spawn (/Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:134:31)
at GradleBuilder.runGradleWrapper (/Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/lib/builders/GradleBuilder.js:78:27)
at /Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/lib/builders/GradleBuilder.js:177:21
at _fulfilled (/Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/node_modules/q/q.js:816:13)
at /Users/smendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/cordova/node_modules/q/q.js:570:49
(node:78984) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:78984) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Android Studio 3.1.4

Any help?

As suggested in #1 (comment)
To solve this issue run:

sudo chmod 777 “/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle”
— BE CAREFUL to the gradle version is yours —

Same issue
ionic-team/ionic-cli#2835

Command is : sudo chmod -R 777 /Users/YourUserName/Library/Android/Applications/Android\ Studio.app/Contents/gradle/gradle-4.1/bin/gradle

I couldn't find this path /Users/YourUserName/Library/Android/Applications/Android\ Studio.app/Contents/gradle/gradle-4.1/bin/gradle on my computer.

Mac OS Sierra 10.12.16

:(

What about this one ionic-team/ionic-cli#2835 (comment) ?
Try to check where do you have installed gradle and update your path with that

Found it
echo $GRADLE_HOME
/usr/local/gradle/gradle-4.0.2

sudo chmod -R 777 "/usr/local/gradle/gradle-4.0.2/bin/gradle”

Thank you It's fixed now.