Each of the three commands contains the one before it. cordova prepare copies www into every platform, adds that platform's cordova.js and turns config.xml into native manifests; run it before opening platforms/android in Android Studio 234 . cordova build is prepare plus compile, the Gradle 19,597 run that writes platforms/android/app/build/outputs/apk/debug/app-debug.apk. cordova run builds, then installs and launches the app.
cordova build android... > Task :wrapper BUILD SUCCESSFUL in 17s ... BUILD SUCCESSFUL in 1m 4s 50 actionable tasks: 50 executed Built the following apk(s): .../platforms/android/app/build/outputs/apk/debug/app-debug.apk
The first BUILD SUCCESSFUL is the wrapper task (Gradle). With several devices attached, name one: --list shows the candidates, and --target takes an adb serial or an AVD name (which it boots if needed):
cordova run android --list
cordova run android --target=emulator-5558Available android devices: Available android virtual devices: book ... BUILD SUCCESSFUL in 1m 36s ... Deploying to emulator emulator-5558 ... INSTALL SUCCESS LAUNCH SUCCESS
emulator-5558 is just this emulator's serial; use whatever adb devices prints, usually emulator-5554.
