Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run an ionic app in android studio emulator?

Tags:

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

like image 230
manasa sidhardhan Avatar asked Mar 10 '17 05:03

manasa sidhardhan


People also ask

Can we develop ionic app in Android Studio?

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.

How do you run the Ionic react app on Android?

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.


2 Answers

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 
like image 186
Sagar Kulkarni Avatar answered Sep 17 '22 19:09

Sagar Kulkarni


  1. First open Android studio and start an emulator wait when its still done (first time needs more time)

    1. test if the emulator is available with `android list devices``

    2. ionic cordova emulate android will publish it on your emulator

like image 25
DrMabuse Avatar answered Sep 19 '22 19:09

DrMabuse