srinivas$ ionic cordova plugin add cordova-plugin-x-toast
> cordova plugin add cordova-plugin-x-toast --save
Installing "cordova-plugin-x-toast" for android
ANDROID_HOME=/Users/srinivas/Library/Android/sdk/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Subproject Path: CordovaLib
Failed to install 'cordova-plugin-x-toast': Error: /Users/srinivas/v1/platforms/android/gradlew: Command failed with exit code EACCES
at ChildProcess.whenDone (/Users/srinivas/Documents/v1/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Error: /Users/srinivas/Documents/v1/platforms/android/gradlew: Command failed with exit code EACCES
[ERROR] An error occurred while running subprocess cordova.
cordova plugin add cordova-plugin-x-toast --save exited with exit code
1.
Re-running this command with the --verbose flag may provide more
information.
Srinivass$ cd ..
solution:
Provide necessary rights to the project folder.
Srinivass$ chmod -R 777 v1/
> cordova plugin add cordova-plugin-x-toast --save
Installing "cordova-plugin-x-toast" for android
ANDROID_HOME=/Users/srinivas/Library/Android/sdk/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Subproject Path: CordovaLib
Failed to install 'cordova-plugin-x-toast': Error: /Users/srinivas/v1/platforms/android/gradlew: Command failed with exit code EACCES
at ChildProcess.whenDone (/Users/srinivas/Documents/v1/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Error: /Users/srinivas/Documents/v1/platforms/android/gradlew: Command failed with exit code EACCES
[ERROR] An error occurred while running subprocess cordova.
cordova plugin add cordova-plugin-x-toast --save exited with exit code
1.
Re-running this command with the --verbose flag may provide more
information.
Srinivass$ cd ..
solution:
Provide necessary rights to the project folder.
Srinivass$ chmod -R 777 v1/