Missing gradle stuff in the platform/android folder


#1

Hi,

When I run the command ionic cordova emulate android command, i get the following error :

> cordova emulate android
ANDROID_HOME=~/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
Error: spawn EACCES

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

So I compared the platform/android folder with one of the projects that works and I notice it is missing .gradle, gradle, gradlew and gradlew.bat

Any idea as to why those are missing? If I copy those over, it works … but only on an emulator running Nougat.

I had an error

Error: Cannot read property 'replace' of undefined

When the emulator was running Oreo …

Thanks


#2

I found my issue …

For those interested, I upgrade Android Studio to 3.0 and gradle also … which i guess broke everything?

So to fix the Error: spawn EACCES, i ran ionic cordova platform update android@6.4.0

And finally, I had to install gradle locally …