Error on ionic build android


#1

root@suparna-Inspiron-3542:/home/suparna/EXE# ionic build android
running cordova build android
Running command: /home/suparna/EXE/hooks/after_prepare/010_add_platform_class.js /home/suparna/EXE
Running command: /home/suparna/EXE/platforms/android/cordova/build
ANDROID_HOME=/home/suparna/Documents/android-sdk-linux/
JAVA_HOME=/opt/devl/jdk1.8.0_31/
Running: /home/suparna/EXE/platforms/android/gradlew cdvBuildDebug -b /home/suparna/EXE/platforms/android/build.gradle -Dorg.gradle.daemon=true

events.js:72
throw er; // Unhandled ‘error’ event
^
Error: spawn EACCES
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)
ERROR building one of the platforms: Error: /home/suparna/EXE/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /home/suparna/EXE/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

if i run ionic run android then emulator is working but app doesn’t exist in emulator and console shows this error

events.js:72
throw er; // Unhandled ‘error’ event
^
Error: spawn EACCES
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)
ERROR running one or more of the platforms: Error: /home/suparna/EXE/platforms/android/cordova/run: Command failed with exit code 8
You may not have the required environment or OS to run this project