I do not see the android emulation window


#1

I’m trying to emulate an android app:
1º I go to the folder where I have my project, for that I write in my command line cd rootofmyproject
2º I write the following commands:

  • ionic cordova platform add android
    *ionic cordova build android
  • ionic cordova emulate android

After the processing of the last statement of the previous statement list has finished, I do not see anywhere a window with an android emulation. Since I’m supposed to be shown a window with the Android operating system, right?
I’m following this tutorial, and there I see that a window appears for the operating system ios, the minute 5:50. I do not know if my problem has something to do with one of the messages that Ionic launches through the console, specifically with this one:

CordovaError: No emulator images (avds) found.

¿What can I do?
For what it’s worth, then I write all the messages that Ionic sends me through the console when I write ionic cordova emulate android:

Running app-scripts build: --platform android --target cordova [21:08:04] build dev started … [21:08:08] clean started … [21:08:09] clean finished in 836 ms [21:08:09] copy started … [21:08:12] deeplinks started … [21:08:12] deeplinks finished in 131 ms [21:08:12] transpile started … [21:09:19] transpile finished in 66.93 s [21:09:19] preprocess started … [21:09:19] preprocess finished in 1 ms [21:09:19] webpack started … [21:09:22] copy finished in 72.92 s [21:09:41] webpack finished in 22.57 s [21:09:41] sass started … Without from option PostCSS could generate wrong source map and will not find
Browserslist config. Set it to CSS file path or to undefined to prevent this w
arning. [21:09:56] sass finished in 14.85 s [21:09:56] postprocess started … [21:09:57] postprocess finished in 497 ms [21:09:57] lint started … [21:09:57] build dev finished in 112.93 s

cordova emulate android [21:10:02] lint finished in 5.79 s Android Studio project detected

ANDROID_HOME=C:\android-sdk-windows JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161 studio Subproject Path: CordovaLib Subproject Path: app Starting a Gradle Daemon (subsequent builds will be faster) publishNonDefault is deprecated and has no effect anymore. All variants are now
published. The Task.leftShift(Closure) method has been deprecated and is scheduled to be re
moved in Gradle 5.0. Please use Task.doLast(Action) instead. at build_c43z9qtayi62ulxyg0zehvtr5.run(C:\RedditApp\platforms\android\ap p\build.gradle:143) :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl

UP-TO-DATE :CordovaLib:compileDebugRenderscript UP-TO-DATE :CordovaLib:checkDebugManifest UP-TO-DATE :CordovaLib:generateDebugBuildConfig UP-TO-DATE

:CordovaLib:prepareLintJar UP-TO-DATE :CordovaLib:generateDebugResValues UP-TO-DATE :CordovaLib:generateDebugResources UP-TO-DATE :CordovaLib:packageDebugResources UP-TO-DATE :CordovaLib:platformAttrExtractor UP-TO-DATE :CordovaLib:processDebugManifest

UP-TO-DATE :CordovaLib:processDebugResources UP-TO-DATE :CordovaLib:generateDebugSources UP-TO-DATE :CordovaLib:javaPreCompileDebug UP-TO-DATE :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE :CordovaLib:processDebugJavaRes NO-SOURCE :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:compileDebugAidl UP-TO-DATE :CordovaLib:packageDebugRenderscript NO-SOURCE :app:compileDebugRenderscript UP-TO-DATE :app:checkDebugManifest UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:prepareLintJar UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources

UP-TO-DATE :app:createDebugCompatibleScreenManifests UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:splitsDiscoveryTaskDebug UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:javaPreCompileDebug

UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk

NO-SOURCE :app:compileDebugSources UP-TO-DATE :CordovaLib:mergeDebugShaders UP-TO-DATE :CordovaLib:compileDebugShaders UP-TO-DATE :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets UP-TO-DATE :app:mergeDebugShaders

UP-TO-DATE :app:compileDebugShaders UP-TO-DATE

:app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets

:app:transformClassesWithStackFramesFixerForDebug UP-TO-DATE :app:transformClassesWithDesugarForDebug UP-TO-DATE :app:transformClassesWithDexBuilderForDebug UP-TO-DATE :app:transformDexArchiveWithExternalLibsDexMergerForDebug

UP-TO-DATE :app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE :CordovaLib:compileDebugNdk NO-SOURCE :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE

:app:mergeDebugJniLibFolders UP-TO-DATE :app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE :app:processDebugJavaRes NO-SOURCE

:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE :app:validateSigningDebug

:app:packageDebug

:app:assembleDebug

:app:cdvBuildDebug

BUILD SUCCESSFUL in 1m 8s 46 actionable tasks: 3 executed, 43 up-to-date Built the following apk(s): C:\RedditApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk

ANDROID_HOME=C:\android-sdk-windows JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161 (node:6996) UnhandledPromiseRejectionWarning: CordovaError: No emulator images (
avds) found. 1. Download desired System Image by running: “C:\android-sdk-windows\tools\andro
id.bat” sdk 2. Create an AVD by running: “C:\android-sdk-windows\tools\android.bat” avd HINT: For a faster emulator, use an Intel System Image and install the HAXM devi
ce driver

at C:\RedditApp\platforms\android\cordova\lib\emulator.js:288:29
at _fulfilled (C:\RedditApp\platforms\android\cordova\node_modules\q\q.js:85
4:54) at self.promiseDispatch.done (C:\RedditApp\platforms\android\cordova\node_mo
dules\q\q.js:883:30) at Promise.promise.promiseDispatch (C:\RedditApp\platforms\android\cordova\n
ode_modules\q\q.js:816:13) at C:\RedditApp\platforms\android\cordova\node_modules\q\q.js:624:44 at runSingle (C:\RedditApp\platforms\android\cordova\node_modules\q\q.js:137
:13) at flush (C:\RedditApp\platforms\android\cordova\node_modules\q\q.js:125:13) at process._tickCallback (internal/process/next_tick.js:176:11) (node:6996) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
id: 1) (node:6996) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.

[OK] Your app has been deployed. Did you know you can live-reload changes from your app with --livereload?


#2

Open Android Studio, install some emulators that can be run.