Android Studio Emulator

Unable to get app to run in emulator on Mac … is it possible to have more info about tech setup of Android studio on Macs in particular more tech info on how emulator communicates with app and android studio

Hi frednrks,

That doesn’t sound too good, but hoping we can get you up and running. Before we can do that though I’d be interested to know where you in the book.

What chapter isn’t providing enough info around the setup of Android Studio? Is there a particular part of Android Studio setup that could do with more direction?

Any information you can provide that can help I’d love to know so we can make sure the book is the best it can be.

Thanks,

Darryl

Hi Darryl,
Thanks for your interest … I am stuck … I am in the first part of the book where it involves setting up android studio.
I am running macOS High Sierra, 10.13.4, on a 3.06 GHz Core 2 Duo with 16 GB 1067 DDR3 RAM,
with an ATI Radeon HD 4670 256 MB HD,
Android Studio is installed and runs, the emulator runs but they don’t seem to communicate with each other and so the Timefighter starter project will not run in the emulator,
I have uninstalled, reinstalled, Android Studio and the emulator … I’m stuck if you could provide more information that would be great.
In reading up on developer.AndroidStudio.com I can’t find a solution although I did see a vague reference to TCP/IP port settings.
I was thinking if you were to provide an overview of how the emulator interacts with AndroidStudio this might help in fault finding and trouble shooting. It appears they communicate with each other via ports … but which ports and how do we check and configure them.
I also get this message and don’t understand if it is relevant to what is not working:
“Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.”
Thanks again Darryl looking forward to your help,
Best regards
frednrks

Hey frednrks,

Thanks for all the info! I’m a little stumped at this point as to why Android Studio wouldn’t be communicating with the emulator.

I noticed you mentioned TCP/IP ports quite a bit. I wouldn’t expect this to be an issue if the machine TCP/IP port settings haven’t been changed.

The quick boot / snapshot warnings look troubling to me. So I’d like to ask you to try the following to see if it resolves the issues you’re seeing.

What I’d like you to do is disable quick boot on your machine, you can do this by editing the device settings of the emulator you are using.

  1. In Android Studio, click on the AVD Manager Button along the top.

  2. Create a Virtual Device similar to the way the book instructs until you reach the Verify Configuration Screen

  3. Click on the Show Advanced Setting, in the expanded scrollview scroll down to Emulated Performance. You should see two radio button titled Cold Boot and Quick Boot. Make sure Cold Boot is selected.

  4. Click Finished

  5. Run the emulator to see if it loads up

This will ensure your machine doesn’t try to use the quick boot function that Android emulators possess, the only trade off is it may take a little longer for the emulator to load so make sure you grab a coffee whilst that happens. :slight_smile:

Whilst I’m at it, I’d like to point you over to a tutorial on the site purely dedicated to setting Android Studio up, freshly updated for 3.0! That may also have some nuggets of information you may find useful: https://www.raywenderlich.com/177533/beginning-android-development-kotlin-part-one-installing-android-studio

I really hope this fixes the problem you’re seeing so you can progress with the book. Let us know ether way and we’ll try something else if the emulator still isn’t playing ball.

Thank you for your perseverance,

Darryl

Hi Daryl I have tried all the things you mentioned but am still unsuccessful in running my app on in the emulator.
Current status:
The emulator runs okay
Android Studio is installed and works okay
Problem:
App does not run in emulator.

I am at my wits end as what to do next so any help you can offer would be very welcome.
Is there an online resource that explains Mac issues … just a reminder that my macs are Core 2 Duo machines. I have tried installing android studio on my mac book pro and a mac desktop.

Same result. Everything runs except my app in the emulator.
Is there a limit as to which emulators can be installed with which SDKs.

Is there an online site which deals specifically with android studio, the emulator and Macs?

Hope you can help me
Frednrks

Hi frednrks,

I’m sorry to hear that. I was really hoping one of those things would be the solution.

I’ve done some research into Android Emulators and machines running Intel Core 2 Duo. It seems that emulators using a version of Android built for running on computers (x86) are prone to misbehave on Core 2 Duo machines.

From what I can gather this is a problem with the software. You can see other people discussing this issue over at: https://software.intel.com/en-us/forums/android-applications-on-intel-architecture/topic/536330

So it’s good to know that you’re not alone in this issue, but I’d like to provide a solution.

Reading through the intel forum thread. It appears people running Core 2 Duo Macs have had success manually installing HAXM (Hardware Accelerated Execution Manager).

This software is provided by Intel to help speed up the emulation of devices running on desktops, without it emulating a whole Android device is an intensive process and you’ll notice it will get laggy. Android Studio often comes equipped with a version of this pre bundled too.

You can get the latest and greatest version of HAXM over at https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm

I’d like you to attempt to install HAXM, following any instructions it provides. Restart your machine, then open up Android Studio and recreate a Android Virtual Device (AVD) following the instructions in the book.

I hope this is the solution for you. Please let me know how you get on and thank you so much for your determination.

Darryl

This is weird - I opened - No device selected - in Android Studio and selected Open iOs simulator and IT OPENED!! Very nice and I do not go further with looking for solutions to the installation failure. Thanks for all your help