Trying to emulate Android app with cordova, but get this error message:
Built the following apk(s): /Users/jnj/cordova/hello/platforms/android/build/outputs/apk/andr
I was getting this error because I thought the "emulation" command would start the emulator, but it seems to only use one that is already running. Some helpful commands and checks that are available on Windows 10 once you have Android Studio and cordova installed:
cordova run --list
will show no devices and give the semver error.adb devices -l
should show no devices attached.%ANDROID_SDK_ROOT%\emulator
,
%ANDROID_SDK_ROOT%\platform-tools
, %ANDROID_SDK_ROOT%\tools
emulator -list-avds
to see which emulators are available. If none, then add them via Android Studio.start cmd
because you'll need another command line.emulator -avd 7_WSVGA_Tablet_API_30
(note that underscores replace any spaces in the name)adb devices -l
should now show a device like "emulator-5554"cordova run --list
still gives a semver error. (Maybe this is a bug?)cordova run android
(from your app's project directory) should start your app using the default emulator, or you can specify which one with cordova run android --target emulator-5554