# Can't add Android platform and build project anymore?

**URL:** <https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800>\
**Category:** ionic-v1\
**Created:** [January 22, 2016, 12:42am UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800 "2016-01-22T00:42:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lay](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@Lay](https://forum.ionicframework.com/u/Lay)\
**Post date:** [January 22, 2016, 12:42am UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800/1 "2016-01-22T00:42:20Z")

</div>

So I wanted to start a new ionic project by writing:  
`ionic start Ionic1 blank`

After that I moved to that new directory and wanted to add android platform:  
`ionic platform add android`

I then got this error:

> Error: Failed to fetch platform android  
> Probably this is either a connection problem, or platform spec is incorrect.  
> Check your connection and platform name/version/URL.  
> Error: EACCES: permission denied, open ‘/home/think/.cordova/lib/npm\_cache/cordova-android/4.1.1/package/.npmignore’

I don’t know why this happens. I tried these:

1. change the permision with  
chmod 744 /home/think/.cordova/lib/npm\_cache/cordova-android/4.1.1/package/.npmignore

2. deinstalled and installed nodejs, cordova, ionic, etc.

3. Executed with sudo ionic platform add android (but “sudo” is not necessary i think since I added android platform before in other projects without having to write “sudo” )

Still it’s somehow not possible to add a platform

---

<div class="post-metadata">

**Author:** ![whizzkey](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/whizzkey/32/95593_2.png) [@whizzkey](https://forum.ionicframework.com/u/whizzkey)\
**Post date:** [January 22, 2016, 4:34am UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800/2 "2016-01-22T04:34:17Z")

</div>

Do you have android SDK manager installed? I assume you are on a mac (sudo) so check this tutorial on how to setup a mac for android:

> **[Justin James](https://digitaldrummerj.me/ionic-setup-osx/)**
>
> Updates:
> 2016-08-13: Added Gradle and VS Code. Changed from JDK7 to JDK8. Removed Ant.
> If you are like me and just starting to work with the Ionic Framework and don’t already have a machine setup to do Android, iOS, Node, etc development then many...

---

<div class="post-metadata">

**Author:** ![Lay](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@Lay](https://forum.ionicframework.com/u/Lay)\
**Post date:** [January 22, 2016, 7:27am UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800/3 "2016-01-22T07:27:03Z")

</div>

I’m on ubuntu 14.04 LTS. I have android SDK manager installed.

I can build and run my other ionic projects that I created earlier. But since yesterday I can’t build new projects anymore. It happened when I iupdated to ionic 1.7.13

---

<div class="post-metadata">

**Author:** ![whizzkey](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/whizzkey/32/95593_2.png) [@whizzkey](https://forum.ionicframework.com/u/whizzkey)\
**Post date:** [January 23, 2016, 5:15am UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800/4 "2016-01-23T05:15:49Z")

</div>

Hi,

As they say in compu-land, “have you tried turning it of and on again??”

try:

`sudo npm install-g ionic sudo npm install-g cordova`

and afterwards  
`ionic platform add android`

---

<div class="post-metadata">

**Author:** ![MaRZoCHi](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/marzochi/32/96034_2.png) [@MaRZoCHi](https://forum.ionicframework.com/u/MaRZoCHi)\
**Post date:** [January 23, 2016, 3:41pm UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800/5 "2016-01-23T15:41:51Z")

</div>

If you create this project as root. You must continue as root permission.

1. Delete your project (as root )
2. Create new project **not as root**

---

<div class="post-metadata">

**Author:** ![Lu\_Arango](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lu_arango/32/108078_2.png) [@Lu\_Arango](https://forum.ionicframework.com/u/Lu_Arango)\
**Post date:** [April 19, 2017, 8:26pm UTC](https://forum.ionicframework.com/t/cant-add-android-platform-and-build-project-anymore/41800/6 "2017-04-19T20:26:29Z")

</div>

Maybe this is a cache problem of cordova. Delete the cache and try to add the platform again:

```auto
rm -rf ~/.cordova

```
