Hey All,
I’m trying to do a fresh build for android --device, and I get this error:
ANDROID_HOME=/Users/mobiledeveloper/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Error: spawn EACCES
Here’s my info:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.15.1
ionic (Ionic CLI) : 3.15.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.3.0 browser 5.0.1 ios 4.5.2
Ionic Framework : ionic-angular 3.7.1
System:
ios-deploy : 1.9.2
Node : v8.4.0
npm : 2.15.12
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy
Is ionic cordova requirements
happy? What does it output?
Could you build before?
Can you build a new project created with ionic start
?
This is a fresh machine so I haven’t built before. I’ve installed and ran the Android SDK and downloaded the stuff I need ( I think )
Here is my cordova requirements
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle
Requirements check results for ios:
Apple macOS: installed darwin
Xcode: installed [object Object]
ios-deploy: installed [object Object]
CocoaPods: installed [object Object]
I’m able to build for ios --device and run in the browser and so on, but running ionic cordova build android --device gives me
ANDROID_HOME=/Users/mobiledeveloper/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Error: spawn EACCES
Anyone got any ideas on this? still stuck
Sujan12
5
What Android Studio version have you installed?
Cordova is not really ready for the newest API 27. Might help to uninstall that maybe.
Fixed by doing:
Ionic cordova build android —verbose
See the exact route of the file that causes the error
Give chmod 755 access to that file
try this sudo chmod 755 “/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle”
Hesters
8
My mate had the same error. He fixed it by doing corodova platform add andriod