使用Eclipse开发Android程序过程中,通过Eclipse启动Android模拟器时出现以下错误:
[2009-05-14 12:05:24 – Emulator] emulator: ERROR: unknown virtual device name: ‘Firehack’
[2009-05-14 12:05:24 – Emulator] emulator: could not find virtual device named ‘Firehack’

而且已经新建了一个名称为"Firehack"(F:/Personal/.android/avd/Firehack.avd)的 Android Virtual Devices,因为所用的操作系统之前做过修改"个人资料"目录即将原来位于系统盘中的桌面转移到了F:/Personal。

因此问题的原因就很简单了,将"F:/Personal/"目录下的".android"目录复制到"C:/Documents and Settings/Administrator"(如果您当前使用的用户为Administrator的话)。再次运行Android模拟器,一切恢复正常了。

完整的出错信息:
[2009-08-23 17:03:43 - ApiDemos] Android Launch!
[2009-08-23 17:03:43 - ApiDemos] adb is running normally.
[2009-08-23 17:03:43 - ApiDemos] Performing com.example.android.apis.ApiDemos activity launch
[2009-08-23 17:03:43 - ApiDemos] Automatic Target Mode: launching new emulator with compatible AVD ‘Firehack’
[2009-08-23 17:03:43 - ApiDemos] Launching a new emulator with Virtual Device ‘Firehack’
[2009-08-23 17:03:43 - Emulator] emulator: ERROR: unknown virtual device name: ‘Firehack’
[2009-08-23 17:03:43 - Emulator] emulator: could not find virtual device named ‘Firehack’
[2009-08-23 17:05:50 - ApiDemos] ——————————

解决方案来源: http://forums.pragprog.com/forums/67/topics/2709

I ran into this very problem. One tool was getting my home directory from the registry (HKCU/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders/Desktop) and another tool was getting it from an environment variable (HOMEPATH or USERPROFILE). For me they didn’t match. I fixed it by changing the Windows registry using the regedit command. Warning: it’s easy to mess up your registry and render your machine unusable if you don’t know what you’re doing in regedit.