How do I get a working emulator?

KarenCateKarenCate ✭✭USMember ✭✭

Hello!

If you are using XamarinStudio on a Mac, what Android emulator are you using? The Google Emulator Manager, and its offspring, have been giving me no end of trouble. Is anyone using them successfully? I really don't want to switch to VisualStudio mid-project like this, does its emulators work on the Mac? Is Genymotion still the standard? Should I give up and do my Android development on the PC?

Any advice would be greatly appreciated.
Thanks!
-Karen

Best Answer

Answers

  • JohnMillerJohnMiller Xamurai USForum Administrator, Xamarin Team Xamurai

    @KarenCate,

    The Google emulators should work fine. What errors are you having?

  • AlanClarkAlanClark Xamurai USForum Administrator, Xamarin Team Xamurai

    @KarenCate I'd probably recommend using the Google AVD emulators. We have a guide for setting those up here:

    https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/android-sdk-emulator/

    Make sure you follow the steps to set up HAXM and download the Intel images as these run much faster than the ARM images.

    I hope that helps! If you're having any specific issues please let us know.

  • KarenCateKarenCate ✭✭ USMember ✭✭

    Been there, done that. Do you have instructions for completely removing them and re-installing?

    The emulator manager itself crashes while scrolling through the list of device definitions. I managed to get to one and click create before it crashed once, so I have an emulator. If I start it from the manager, XS connects to it once and I can run my program. The second time I run, it starts a second emulator, and that will hang while the chrome-y "android" is displayed. "Quit" doesn't kill it, and strangely, OSX doesn't give me the force quit option for it. If I do get it killed, the Emulator Manager then can't restart it either, it just hangs. I have to shut everything down and restart the OS... on a Mac! Egads.

    I have triple checked, everything is up to date.

    I was off of mobile development for almost two years. When I got back to it, it was a fairly big update jump, and the Android SDK didn't install cleanly. I had a Java version problem, or something. The way the Xamarin installer invokes the SDK installer makes it difficult to see that there was an error. I'm afraid it's been too long ago for me to remember much detail on that. I had hoped that I had it all straightened out, but apparently not. I've been hesitant to remove it all and start over because it takes so long to load the SDK. Even just a handful of updates takes a good hour. But unless there's a repair tool besides the SDK manager, that's what I'm going to have to do.

    I should probably also mention that the Xaml previewer also doesn't work for me. It used to tell me that I need to build my Android project for it to work. Now it tells me I need to call Xamarin.Forms.Init() first. Perhaps that's a clue?

    Thank you so much for your help!
    -Karen

  • KarenCateKarenCate ✭✭ USMember ✭✭

    @AlanClark @JohnMiller Sorry, I should have tagged you in my response, above. Thanks for your help!

  • KarenCateKarenCate ✭✭ USMember ✭✭

    @AlanClark Argh. I deleted and reloaded the JDK. I'd like to do the android SDK, too, but the Android page (https://developer.android.com/studio/index.html) no longer contains a download that looks like "sdk_r[xx.x.x]-macosx.zip". The options now are for the Android IDE, or just the tools. The tools directory that is downloaded contains only the tools subdirectory, and not the rest of the SDK.

    I tried downloading the full IDE to see if it contained something that resembled the SDK, but it does not. It might have been there as a .jar file, but I didn't dig any deeper.

    Updating the JDK (I loaded one version newer than what I had before) might have fixed the problem. At least I was able to run my app twice in a row, and the emulator took MUCH less time to come up. fingers crossed

    Should I report the installation instructions to someone? Or can you forward that on to the correct person.

    Thank you ever so much for your help!
    Merry Christmas!
    -Karen

  • KarenCateKarenCate ✭✭ USMember ✭✭

    More Argh. After re-loading the JDK, the emulator worked for a few days, then today it froze up. I had to kill -9. Then I shut everything down and restarted the mac. No go. Even an emulator I've never run before freezes with the Android logo (and no movement).

    I suppose I can remove and reinstall the JDK again, but I'd really prefer to figure out what's causing the problem and fix it.

    As always, any help is greatly appreciated.
    Happy New Year!
    -Karen

Sign In or Register to comment.