简体   繁体   中英

Android emulator won't boot up

I'm trying to install android sdk and run my first application on my PC (Win7 64 bit). I followed instructions on http://developer.android.com from the beginning to http://developer.android.com/training/basics/firstapp/running-app.html When I try to start emulator (as mentioned on the last url) simply nothing shows up.

5 - Select the new AVD from the Android Virtual Device Manager and click Start.

It doesn't show any error messages. After launching AVD a process named adb.exe appears on task manager.

Below is eclipse console output when try to run my blank app from eclipse. On configurations, I set different target devices and selected starting activity manually. The same problem continues.

When AVD is started from outside of eclipse ( \\sdk\\platform-tools>android avd ):

[2013-03-22 08:50:48 - 1st] ------------------------------
[2013-03-22 08:50:48 - 1st] Android Launch!
[2013-03-22 08:50:48 - 1st] adb is running normally.
[2013-03-22 08:50:48 - 1st] Performing com.example.st.MainActivity activity launch
[2013-03-22 08:50:49 - 1st] Automatic Target Mode: launching new emulator with compatible AVD 'AvdTest'
[2013-03-22 08:50:49 - 1st] Launching a new emulator with Virtual Device 'AvdTest'

When AVD is started from eclipse :

[2013-03-22 09:22:44 - 1st] ------------------------------
[2013-03-22 09:22:44 - 1st] Android Launch!
[2013-03-22 09:22:44 - 1st] adb is running normally.
[2013-03-22 09:22:44 - 1st] Performing com.example.st.MainActivity activity launch
[2013-03-22 09:22:44 - 1st] Automatic Target Mode: Preferred AVD 'AvdTest' is not available. Launching new emulator.
[2013-03-22 09:22:44 - 1st] Launching a new emulator with Virtual Device 'AvdTest'

I also downloaded only sdk and installed eclipse plugin but result is the same.

Tried to use logcat also. Started it then started AVD, but logcat shows nothing. When I kill adb.exe from task manager,it kills logcat too.

\sdk\platform-tools>adb -e logcat
- waiting for device -

\sdk\platform-tools>

After reinstalling IDE/SDK a couple of times I decided to ask it here. What else I can do?

Edit : Folks, I have a virtual device. Please stop suggesting adding a virtual device.

虚拟设备管理器

开发工具包

蚀

I had the similar problem on OSX. My emulator works fine, but after some runs it won't start. I've solved that by :

  1. Go to .android directory (in my case it was Users/<username>/.android
  2. Go to avd folder
  3. Find the emulator that won't start (directory name will be the same as emulator)
  4. Remove all .img files from there. Do not remove .ini files.
  5. Try to run the simulator again.

I found it. In event viewer(Control Panel\\All Control Panel Items\\Administrative Tools\\Event Viewer) clicked on Windows Log>Application on left menu and read error logs.

事件簿

I googled dll file mentioned in log ( aticfx32.dll ) and found the dll file belongs to ATI graphic cards. My PC has an Intel graphic card. While searching for solution I also found this web page and applied solution they used. It works like a charm.

Steps:

  1. Download your graphics card driver from intel's website
  2. Extract the zip somewhere, Location does not matter
  3. Go into Device Manager, (type Device Manager in the windows search bar)
  4. Click Display Adapters and Intel HD Graphics.
  5. Go to the tab labeled "Drivers"
  6. Click "Update Drivers" and "Browse my computer for drivers"
  7. Click "Let me pick from a list of drivers"
  8. Click the Have Disk Button,
  9. Navigate to where your extracted drivers are and go into the directory labeled "Graphics"
  10. Select the file named "igdlh64.INF"
  11. Click on the OK button and then click Next, the drivers should install
  12. After that you need to reboot, and after rebooting your drivers should be updated

就我而言,我不得不从我的 avd 设备文件夹 (C:\\Users\\User_Name.android\\avd\\Device_Name.avd) 中删除文件cache.img.qcow2

I came here beacuse i have same problem, with Android Studio 3.6 and win 10 OS

I fixed that with this steps:

  1. Go to AVD Manager
  2. Hit Virtual device configuration (pencil icon)
  3. Hit show advance setting
  4. Scroll down to Boot options
  5. Choose Cold boot
  6. Hit finish

If problem remain same,

  1. Hit drop down near pencil icon
  2. Wipe data
  3. Hit refresh button at the right bottom near question mark button

I run into this issue at least once every time I try to start a new project, maybe from projects sharing devices. In the following folder:

C:\\Users\\.android\\avd\\ (eg Nexus_5_API_23.avd)

I had to delete the following files pictured. I tried deleting the .qcow2 files as one user mentioned without luck. Notice all the files deleted are the newest modified files/folders (see the Date Modified column) that are not .ini or .conf files.

在此处输入图片说明

UPDATE: It seems if I delete just the snapshots directory (pictured above), that does the trick too.

Have you installed any "Target" API?. Have you configured any "Virtual Device"?

The Log tells you that it can't find 'avdTest' device, it could be because you didn't configure it, or just, it's not present.

Try to setup a device at the Eclipse's "Virtual Device Manager", then, start the virtual device from this menu ( AVD devices -> Start... ) and if it works, then run your code on it.

I don't recommend you using command line for the first time. Also I recommend you trying with Android 2.3.3 (API 10) for first, because it takes less time time to start the emulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM