Can't build android app. Why?


#1

When I build my app. I get this error. I don’t known what it mean.
Please, Can someone help me?

eunovate@EVT-K42Jr:~/testApp$ sudo ionic build android
Running command: /home/eunovate/testApp/hooks/after_prepare/010_add_platform_class.js /home/eunovate/testApp
add to body class: platform-android
Running command: /home/eunovate/testApp/platforms/android/cordova/build
ANDROID_HOME=/home/eunovate/android-sdk
JAVA_HOME=/opt/jdk/jdk1.8.0_51
Running: /home/eunovate/testApp/platforms/android/gradlew cdvBuildDebug -b /home/eunovate/testApp/platforms/android/build.gradle -Dorg.gradle.daemon=true
error caught: Error: spawn EACCES
/home/eunovate/testApp/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1162:11)
at Object.exports.spawn (child_process.js:995:9)
at module.exports (/home/eunovate/testApp/platforms/android/cordova/lib/spawn.js:37:35)
at /home/eunovate/testApp/platforms/android/cordova/lib/build.js:370:24
at _fulfilled (/home/eunovate/testApp/platforms/android/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/eunovate/testApp/platforms/android/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/eunovate/testApp/platforms/android/cordova/node_modules/q/q.js:760:13)
at /home/eunovate/testApp/platforms/android/cordova/node_modules/q/q.js:821:14
at flush (/home/eunovate/testApp/platforms/android/cordova/node_modules/q/q.js:108:17)


#2

Why are you running with sudo?