I\'ve been modifying/editing parts of the Android platform, but have run into a problem when trying to test my edits. After making my changes to the platform source, I was able
The first startup can take a while, especially on a slow machine but otherwise try running the adb logcat command to see the log output. That will help you determine what the problem could be.
Also if you like to skip supplying all the options to the emulator, i.e. -system and the other you can use the scripts supplied in the build folder. Run these commands from the open source project root folder:
source build/envsetup.sh
setpaths
The first one will run the envsetup script for Android that supplies a number of helpful commands. The second one sets up all the paths needed for Android platform development. Among them are the ANDROID_PRODUCT_OUT variable that informs the emulator where to look for the build images. It is set to the default folders that you have specified above. After running setpaths you can just start the emulator with your build by typing emulator on the command line.
Try using adb logcat
in the terminal to see what's happening with the emulator. When I did that I kept noticing
I/ServiceManager( 918): service 'media.audio_flinger' died
I/ServiceManager( 918): service 'media.player' died
I/ServiceManager( 918): service 'media.camera' died
I/ServiceManager( 918): service 'media.audio_policy' died
repeating every 10s or so. I tried enabling my cameras in the AVD and the emulator started working.
To enable the camera enter android avd
in the terminal and set the front and back camera options.
I had this problem and fixed it by deleting the emulator and creating a new one. In eclipse:
It started in about 30 seconds after I did that.
Normally the emulator starts in about 2-3 minutes for me. Then it mysteriously stopped working. I was seeing boot animation for 30 minutes before I gave up. Rebooting my laptop didn't help, which made me think it was a problem with the emulator settings, and I stumbled on this solution.
My trick to get the emulator started on a weak machine (RAM: just 1 GB) is to start it as first thing after WinXP has finished booting. Further, using an emulator instance with a smaller resolution (smaller number of pixels on display to emulate, e.g. just 240x400) did also help.
I had a similar problem. The emulator was unresponsive and Android Studio was unable to deploy and run the application. My solution was the following: 1. Open the AVD manager 2. On right hand side menu of the virtual device issue the commands "Stop" and "Wipe data" 3. Then, do a cold boot of the virtual device and voila, it came back to life.
I normally have to restart it to get it to run. Today it wouldn't restart no matter what. Doing a ./adb logcat consistently showed 'waiting for device'. So I restarted it using Eclipse Android SDK and AVD Manager / Start... (option), un-checking the 'Launch from snapshot' option, and after the long grind of load it, the emulator works.