2

I am trying to use Ionic on Mac, but building to an android emulator target and not just running the browser version. The Cordova docs indicate that Android Studio should have everything, and indeed there are all the relevant wrappers etc. there:

$ ls ../AndroidProjects/
AndroidProjects.iml gradle          local.properties
app         gradle.properties   settings.gradle
build           gradlew
build.gradle        gradlew.bat

But somehow I can't figure out what to add to my PATH to get a project in a different directory to find that stuff, and I don't want to download gradle itself.

$ ionic cordova emulate android
<stuff>
(node:56809) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle 
in your path, or install Android Studio

Even if I explicitly put the Android Studio project folder in my path, this happens. Weirdly, the final message is still

[OK] Your app has been deployed.

This does not appear to be this question or this question.

kcrisman
  • 4,374
  • 20
  • 41

0 Answers0