I am new to ionic and I want to run my app on android studio emulator. I did refer the link https://developer.android.com/studio/run/index.html. But I do not seem to understand how to run my ionic app on emulator
We don't recommend using Android Studio for developing Ionic apps. Instead, it should only really be used to build and run your apps for the native Android platform and to manage the Android SDK and virtual devices.
Running your Ionic application on an Android emulator can be done in a similar way to iOS. For Android, you'll need to have Android Studio installed. You'll also need to have a virtual device created with the Android Virtual Device Manager. You'll then be asked to select a device to run your app on.
First ensure that your Android Studio setup is correctly done. If want to do that from scratch refer these links - link1 and link2. In link2, you can choose your OS as well.
This ionic guide will help you setup ionic project correctly. If you follow this guide entirely, you will see the use of emulate
, platform
, run
, serve
, etc commands of ionic.
Basically what you need to do is first add an android platform to your project:
ionic cordova platform add android
And then emulate your project using:
ionic cordova emulate android
First open Android studio and start an emulator wait when its still done (first time needs more time)
test if the emulator is available with `android list devices``
ionic cordova emulate android will publish it on your emulator
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With