# Ionic platform add android failed

**URL:** <https://forum.ionicframework.com/t/ionic-platform-add-android-failed/21349>\
**Category:** ionic-v1\
**Created:** [April 20, 2015, 7:51pm UTC](https://forum.ionicframework.com/t/ionic-platform-add-android-failed/21349 "2015-04-20T19:51:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pr0x1ma](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pr0x1ma/32/93764_2.png) [@pr0x1ma](https://forum.ionicframework.com/u/pr0x1ma)\
**Post date:** [April 20, 2015, 7:51pm UTC](https://forum.ionicframework.com/t/ionic-platform-add-android-failed/21349/1 "2015-04-20T19:51:46Z")

</div>

Hi guys!  
I’m having this problem when I try to add android platform to my ionic app  
Java installed  
Android tools and platform tools are in my PATH  
Cordova installed  
Im running Linux Mint 17  
Running the command as SuperUser produces the same result.  
Here’s the output from **ionic platform add android** :  
Thanks in advance.

> Running command: /home/proxima/Desktop/Code/IONIC/MyApp/hooks/after\_prepare/010\_add\_platform\_class.js /home/proxima/Desktop/Code/IONIC/MyApp  
> 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 Object.exports.spawn (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/cordova/superspawn.js:100:31)  
> at runScriptViaChildProcessSpawn (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/hooks/HooksRunner.js:188:23)  
> at runScript (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/hooks/HooksRunner.js:131:16)  
> at /usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/hooks/HooksRunner.js:114:20  
> at \_fulfilled (/usr/local/lib/node\_modules/cordova/node\_modules/q/q.js:787:54)  
> at self.promiseDispatch.done (/usr/local/lib/node\_modules/cordova/node\_modules/q/q.js:816:30)  
> at Promise.promise.promiseDispatch (/usr/local/lib/node\_modules/cordova/node\_modules/q/q.js:749:13)\*

---

<div class="post-metadata">

**Author:** ![grillorafael](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/grillorafael/32/65238_2.png) [@grillorafael](https://forum.ionicframework.com/u/grillorafael)\
**Post date:** [April 20, 2015, 7:56pm UTC](https://forum.ionicframework.com/t/ionic-platform-add-android-failed/21349/2 "2015-04-20T19:56:16Z")

</div>

Try changing your hooks permissions.

`chmod +x hooks/after_prepare/010_add_platform_class.js`

Do this to all files under hooks/

---

<div class="post-metadata">

**Author:** ![pr0x1ma](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pr0x1ma/32/93764_2.png) [@pr0x1ma](https://forum.ionicframework.com/u/pr0x1ma)\
**Post date:** [April 20, 2015, 8:00pm UTC](https://forum.ionicframework.com/t/ionic-platform-add-android-failed/21349/3 "2015-04-20T20:00:10Z")

</div>

Awesome! It worked.  
Thank you!
