# Error: spawn EACCES on a fresh install

**URL:** <https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956>\
**Category:** ionic-v3\
**Created:** [November 30, 2017, 5:26pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956 "2017-11-30T17:26:37Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [November 30, 2017, 5:26pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/1 "2017-11-30T17:26:38Z")

</div>

Just installed a new app and getting this error. Check below:

 ![23 PM](https://global.discourse-cdn.com/ionicframework/original/3X/d/5/d590edb904bba4473047899e9f37d944f91516b0.png)

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 30, 2017, 5:36pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/2 "2017-11-30T17:36:19Z")

</div>

What is your `ionic info` output?  
What does `ionic cordova requirements` return?

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [November 30, 2017, 5:39pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/3 "2017-11-30T17:39:18Z")

</div>

`Ionic Info:`

 ![57 PM](https://global.discourse-cdn.com/ionicframework/original/3X/c/c/cc43caa88d5138315ec777a04688c9fdec0234c5.png)

`ionic cordova requirements:`

 ![48 PM](https://global.discourse-cdn.com/ionicframework/original/3X/a/5/a53df2539f21b63676b561e1cc598b9ad6e88231.png)

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 30, 2017, 5:54pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/4 "2017-11-30T17:54:59Z")

</div>

Please don’t post screenshots with this terrible font but plain text.

What I can read indicates you don’t have any Android targets installed and your cordova-android is quite old - current is 6.4.0 right now.

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [November 30, 2017, 5:56pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/5 "2017-11-30T17:56:22Z")

</div>

Can you please tell me how to have android target installed? And what’s the correct command to upgrade cordova-android?

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [November 30, 2017, 5:58pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/6 "2017-11-30T17:58:53Z")

</div>

Please check installed sdk

 ![12 PM](https://global.discourse-cdn.com/ionicframework/original/3X/3/0/30cb92f806da5a917075616f366d61222cea2eea.png)

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [November 30, 2017, 6:07pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/7 "2017-11-30T18:07:19Z")

</div>

Getting this error:

```auto
$ adb shell am start -n "io.ionic.starter/io.ionic.starter.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "io.ionic.starter/io.ionic.starter.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=io.ionic.starter/.MainActivity }
Error type 3
Error: Activity class {io.ionic.starter/io.ionic.starter.MainActivity} does not exist.

Error while Launching activity

```

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 30, 2017, 6:44pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/8 "2017-11-30T18:44:10Z")

</div>

So you fixed the other problems?

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [December 1, 2017, 4:01am UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/9 "2017-12-01T04:01:25Z")

</div>

No… These are the problems i am getting.

---

<div class="post-metadata">

**Author:** ![Ben1nB1ack](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ben1nb1ack/32/114904_2.png) [@Ben1nB1ack](https://forum.ionicframework.com/u/Ben1nB1ack)\
**Post date:** [December 1, 2017, 6:33am UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/10 "2017-12-01T06:33:32Z")

</div>

I found that Andriod 6.0 (Marshmallow) Api Level 23, was the highest I could go, and you need to match gradle

I would uninstall all SDK besides 6.0

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [December 1, 2017, 4:45pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/11 "2017-12-01T16:45:37Z")

</div>

Hi @Sujan12,

Please help me to fix this issue.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [December 1, 2017, 4:55pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/12 "2017-12-01T16:55:42Z")

</div>

It is impolite to mention individual people in your comment just to get their attention. I am not your personal support.

I have no idea what [Error: spawn EACCES on a fresh install](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/7?u=sujan12) has to do with your previous posts.

[Error: spawn EACCES on a fresh install](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/4?u=sujan12) also had another information bit you ignored.

---

<div class="post-metadata">

**Author:** ![killerchip](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/killerchip/32/110654_2.png) [@killerchip](https://forum.ionicframework.com/u/killerchip)\
**Post date:** [December 1, 2017, 4:58pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/13 "2017-12-01T16:58:26Z")

</div>

Hi aditya\_1027

I just came out of the same nasty situation…  
In my case it was that I had upgraded to Android Studio 3.0 and that thing removed the execution rights from the gradle exucutable.

I just added the +x access right to gradle and now it works fine.

I guess you are using Linux or MacOS  
In your screenshot see the "Gradle: " path and change permissions with:

`chmod +x <path to gradle executable>`

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [December 4, 2017, 6:01pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/14 "2017-12-04T18:01:26Z")

</div>

Hi,

I just solved the `ionic cordova requirements` issue by using this command `brew cask reinstall android-sdk`. But still i am getting the error…

`ionic cordova requirement`

```auto
ionic cordova requirements
> cordova requirements

Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true
Android target: installed android-27,android-26,android-23,android-22,Google Inc.:Google APIs:22,android-16

Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

```

Error when i run `ionic cordova run android --livereload`

```auto
[23:27:45] lint finished in 6.92 s 
ANDROID_HOME=/Users/aditya/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home
Subproject Path: CordovaLib
Error: spawn EACCES

[ERROR] An error occurred while running cordova run android (exit code 1)

```

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [December 4, 2017, 6:06pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/15 "2017-12-04T18:06:28Z")

</div>

`chmod +x platforms/android/gradlew`

Above command solved the issue.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [December 6, 2017, 10:23pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/16 "2017-12-06T22:23:50Z")

</div>

The correct solution would probably have been:

- Install a Standalone Gradle from [gradle.org/install](http://gradle.org/install) (if you have Android Studio 3 installed)
- Upgrade cordova-android to 6.4.0 (`ionic cordova platform remove android`, `ionic cordova platform add android@6.4.0`)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 10:01pm UTC](https://forum.ionicframework.com/t/error-spawn-eacces-on-a-fresh-install/113956/17 "2021-07-19T22:01:14Z")

</div>

Closed on July 19, 2021, 10:01pm UTC


