# "ionic serve" works correctly; "ionic emulate android" just displays android emulator home screen

**URL:** <https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524>\
**Category:** tutorials\
**Created:** [May 31, 2016, 3:37pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524 "2016-05-31T15:37:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![UrbanCondor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/urbancondor/32/103029_2.png) [@UrbanCondor](https://forum.ionicframework.com/u/UrbanCondor)\
**Post date:** [May 31, 2016, 3:37pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/1 "2016-05-31T15:37:42Z")

</div>

Hi forum, I am a first time user of ionic so please bear with me.

I am following the basic [Ionic Book](http://ionicframework.com/docs/guide/) tutorial. Everything is going well until I got to [Chapter 4](http://ionicframework.com/docs/guide/testing.html) where I need to test my app.

Using the command “$ ionic serve” loads up my “todo” app in Google Chrome, which is what I expected. However, using the command “$ionic emulate android” loads up the android emulator as expected, however fails to load the app itself. The android emulator home screen appears to be working perfectly (button clicks, menu function, etc.) however I was expecting my “todo” app to open (and it doesn’t).

Is there anything I can do to check why it is not opening? Any settings I need to check? Anything I possibly haven’t configured?

Here are some of my system info details. Please let me know if I am missing anything:  
Cordova Version: 6.2.0  
Ionic Framework Version: 1.3.1  
Ionic CLI Version: 1.7.15  
Ionic App Lib Version: 0.7.2  
OS: Windows 7 SP1  
Node Version: v5.11.1  
Android Studio Version: 2.1.1  
AVD: Nexus 5X (Marshmallow / API 23 / Android 6.0 x86)

---

<div class="post-metadata">

**Author:** ![vikSwapd](https://avatars.discourse-cdn.com/v4/letter/v/ec9cab/32.png) [@vikSwapd](https://forum.ionicframework.com/u/vikSwapd)\
**Post date:** [May 31, 2016, 4:38pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/2 "2016-05-31T16:38:44Z")

</div>

Have you tried `ionic run android` ? Are there any errors in the console?  
I would always recommend testing on a real device anyways. Either through `ionic run` or using the great [ionic view app](http://view.ionic.io/) which is quite easy to set up.

---

<div class="post-metadata">

**Author:** ![UrbanCondor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/urbancondor/32/103029_2.png) [@UrbanCondor](https://forum.ionicframework.com/u/UrbanCondor)\
**Post date:** [June 1, 2016, 1:33am UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/3 "2016-06-01T01:33:03Z")

</div>

I’ve tried `ionic run android` and the only difference between that and `ionic emulate android` is an additional line in the console stating that no device was detected, so the app will be pushed to the emulator (sorry i’m not at my dev machine right now so can’t provide you with the exact text).

No other errors were visible using the console.

I was hoping to use the emulator to begin with, then eventually begin to test on a real device. Thanks for recommending the use of ionic view app, I’ve successfully managed to get that to work.

I would still like to resolve this `ionic emulate android` issue if there are any other suggestions?

---

<div class="post-metadata">

**Author:** ![vikSwapd](https://avatars.discourse-cdn.com/v4/letter/v/ec9cab/32.png) [@vikSwapd](https://forum.ionicframework.com/u/vikSwapd)\
**Post date:** [June 1, 2016, 8:36am UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/4 "2016-06-01T08:36:44Z")

</div>

It would be helpful if you could provide the whole console output.  
Does the app build successfully? Have you checked whether the app is installed on the emulator?

Maybe try running `adb logcat` from a different cmd while you run the emulator. This should show you problems with the emulator.

---

<div class="post-metadata">

**Author:** ![UrbanCondor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/urbancondor/32/103029_2.png) [@UrbanCondor](https://forum.ionicframework.com/u/UrbanCondor)\
**Post date:** [June 1, 2016, 12:56pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/5 "2016-06-01T12:56:42Z")

</div>

This is what the console displays when I run `ionic emulate android`:

![image](https://global.discourse-cdn.com/ionicframework/original/3X/e/4/e4fc7fd8688fa73d7a60fd825d49adf079c5dd4b.png)

This is what the console displays when I run `ionic run android`:

![image](https://global.discourse-cdn.com/ionicframework/original/3X/8/7/878e02bcdee504b65370a573ab0d6d4999dbb8fb.png)

And this is what is displayed on my emulator (i.e. just the home screen):

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/e/6/e6ba7548f339f06eef8b5b7e983970db94baa678.png)

It is my understanding (based on online instructions and videos) that the emulator should open the app content immediately upon startup and should not just display the home screen. The app is not “installed” on the emulator because I don’t believe I have got that far yet (in regards to packaging an app that becomes installed / has it’s own icon.

I ran `adb logcat` (in a separate cmd prompt) prior to running the `ionic emulate android` command and then stopped it after the emulator had loaded. The output is approx 23,000 lines long. If you’d like to see it then let me know the best way to share it with you.

---

<div class="post-metadata">

**Author:** ![vikSwapd](https://avatars.discourse-cdn.com/v4/letter/v/ec9cab/32.png) [@vikSwapd](https://forum.ionicframework.com/u/vikSwapd)\
**Post date:** [June 1, 2016, 1:11pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/6 "2016-06-01T13:11:12Z")

</div>

Looks like your app doesnt even build. Weird that it doesn’t give you any errors. Are your path variables setup correctly? Maybe go through this and check if everything is setup properly: [http://www.tiagoporto.com/blog/environment-setting-tutorial-ionic-android-on-windows/](http://www.tiagoporto.com/blog/environment-setting-tutorial-ionic-android-on-windows/)  
Is `ionic build android` for you? Are there any .apk s in your build folder?

---

<div class="post-metadata">

**Author:** ![UrbanCondor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/urbancondor/32/103029_2.png) [@UrbanCondor](https://forum.ionicframework.com/u/UrbanCondor)\
**Post date:** [June 1, 2016, 1:11pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/7 "2016-06-01T13:11:53Z")

</div>

OK, my problem is RESOLVED (I believe). What I ended up doing was running the emulator via a cmd prompt (i.e. `ionic emulate android`) so that it opened the emulator on the home screen. I then opened another cmd prompt and ran the `ionic emulate android` command again and this resulted in what looks like an installation and launch of the application onto the open emulator (see cmd prompt screenshot below). It is now behaving as expected.

Thanks so much for your help.

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/b/9/b9261dd2910a12466fb5e564a403194358c88006.png)

---

<div class="post-metadata">

**Author:** ![Cerny](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cerny/32/102066_2.png) [@Cerny](https://forum.ionicframework.com/u/Cerny)\
**Post date:** [July 9, 2016, 8:41pm UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/8 "2016-07-09T20:41:22Z")

</div>

You are a genius!! Thank you!! I wonder what is the problem there and how come is not working as smoothly as `ionic emulate ios` in my case. Is it intentional or bug?

---

<div class="post-metadata">

**Author:** ![aungconvertium](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@aungconvertium](https://forum.ionicframework.com/u/aungconvertium)\
**Post date:** [July 29, 2016, 3:39am UTC](https://forum.ionicframework.com/t/ionic-serve-works-correctly-ionic-emulate-android-just-displays-android-emulator-home-screen/53524/9 "2016-07-29T03:39:28Z")

</div>

I got the same problem and your answer saved the day. Btw, what does actually cause the problem?
