i need ur help
when i accede in my root on ubuntu i got a problem frown emoticon i can’t run android command line
and he said me :android command not found but another side when run it without root tamchi normale
i did everything i added environment variables
th main problem when run the command 'ionic build android ’ from user i got the problema permission
in this case cordova cannot delete some file bcz don’t have permission
like superuser from root
root@lakb:/home/lakhdar/Public/appsionic/myApp# ionic build android
Running command: /home/lakhdar/Public/appsionic/myApp/hooks/after_prepare/010_add_platform_class.js /home/lakhdar/Public/appsionic/myApp
add to body class: platform-android
Running command: /home/lakhdar/Public/appsionic/myApp/platforms/android/cordova/build
[Error: ANDROID_HOME is not set and “android” command not in your PATH. You must fulfill at least one of these conditions.]
ERROR building one of the platforms: Error: /home/lakhdar/Public/appsionic/myApp/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/lakhdar/Public/appsionic/myApp/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
root@lakb:/home/lakhdar/Public/appsionic/myApp#
and when run ionic build command from user i got this result :
akhdar@lakb:~/Public/appsionic/myApp$ ionic build android
cp: copyFileSync: could not write to dest file (code=EACCES):/home/lakhdar/Public/appsionic/myApp/platforms/android/res/xml/config.xml
rm: could not remove file (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android/nativeapiprovider.js
rm: could not remove file (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android/nativeapiprovider.js
rm: could not remove file (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android/promptbasednativeapi.js
rm: could not remove file (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android/nativeapiprovider.js
rm: could not remove file (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android/promptbasednativeapi.js
rm: could not remove directory (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android
rm: could not remove file (code EACCES): /home/lakhdar/Public/appsionic/myApp/platforms/android/assets/www/cordova-js-src/android/nativeapiprovider.js
etc etc …
thank you ionic’ers