1

I just installed the Android SDK (4.2) in Eclipse Juno on my MacBook Pro and am trying to get started just by working through some of the tutorials. But when I use the Galaxy Nexus emulator (selecting ARM CPU), it works the first time. But then when I re-open Eclipse to make some changes to the project, I just get a big crash log, and nothing happens. The only way I have found to get it going again is to delete the emulator from command line in ~/.android/avd, then create it again. But that's obviously not right and shouldn't be necessary. Any ideas? P.S.: This is not the problem discussed at Android Emulator do not scale to 100% for Mac Book Pro with Retina Display because the emulator is full-size and works fine the first time it is started, but doesn't work at all the next time I open Eclipse and try to start it.

Community
  • 1
  • 1
Marshall Farrier
  • 947
  • 2
  • 11
  • 20
  • Strange... have you tried changing any of the options? For example, reducing RAM to 512MB or enabling/disabling GPU support? – Oleg Vaskevich Jan 04 '13 at 17:41

2 Answers2

2

If you are running on two screen, you might be experiencing this issue, Android VM crashes on Launch Mac. I routinely have my emulators crash on starting them and then have to manually tweak the emulator's emulator-user.ini file to set the windows.x and windows.y values to zero. I suspect this is because I go between one and two screen modes frequently.

Hope this helps.

Community
  • 1
  • 1
Mike
  • 777
  • 3
  • 7
  • 14
  • I feel sure that is correct, as I am running 3 monitors. Would it help it I left the emulator in the main monitor and ran Eclipse from one of the others? I may have some follow-up questions once I get home and see what's going on with the emulator-user.ini file. Thanks! – Marshall Farrier Jan 04 '13 at 19:38
  • That was in fact the problem. A moderately good solution (which also helps with the problem of the enormous startup time for the emulator) is to select the snapshot checkbox when you create the emulator. Then the first time you can check 'save to snapshot' and after that 'launch from snapshot'. A friend at work suggested that, and it seems to work ok, except that it still doesn't like moving between screens. It will eventually do it, but it's not happy about it. – Marshall Farrier Jan 05 '13 at 03:13
0

This is a specific MAC problem, it happens because you run two screens on your MAC and placed the emulator in another window. It saves some values which it cannot restore the window again. So this will be updated in a new version they said, but not yet fixed. To fix this you need to do a hack by going to your folder:

~/.android/avd/

Dependent on the emulator you want to run, enter youremulator.avd folder. There is a file, as mentiond over, called

emulator-user.ini

Change window.x and window.y values to 0 and re run your javaprogram. It worked fine for me

vonGohren
  • 929
  • 8
  • 22