Error: spawn EACCES on a fresh install


#1

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


#2

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


#3

Ionic Info:

ionic cordova requirements:


#4

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.


#5

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


#6

Please check installed sdk


#7

Getting this error:

$ 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

#8

So you fixed the other problems?


#9

No… These are the problems i am getting.


#10

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


#11

Hi @Sujan12,

Please help me to fix this issue.


#12

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 has to do with your previous posts.

Error: spawn EACCES on a fresh install also had another information bit you ignored.


#13

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>


#14

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

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

[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)

#15

chmod +x platforms/android/gradlew

Above command solved the issue.


#16

The correct solution would probably have been:

  • Install a Standalone Gradle from 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)

Error: spawn EACCES - what is this?
How to fix this Error: spawn EACCES
Ionic build android, Error: spawn EACCES