Ionic cordova run android --device is not working on my new macbook

with ionic cordova run android --device
it comes out error like below

cordova run android —device
ANDROID_HOME=/Users/pedrojung/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home
/Applications/Android Studio.app/Contents/gradle/gradle-5.1.1/bin/gradle: Command failed with exit code EACCES

when I typed java -version.

and when I type cordova requirements

KakaoTalk_Photo_2019-05-04-01-45-52

i install android platform 6.3.0 and tried 6.4.0 neither works

This issue occurred because the path (JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home
/Applications/Android Studio.app/Contents/gradle/gradle-5.1.1/bin/gradle: ) contains space.
I fixed this issue in My MackBook by just renaming “Android Studio” in Applications to “Android_Studio”.

Hope it helps.

2 Likes

It Worked Thanks
the issue is with the application name.