3
I had the same problem this weekend. In my case, I was able to create the AVD's, but not able to start them.
這個周末我遇到了同樣的問題。在我的例子中,我能夠創建AVD,但是不能啟動它們。
The problem was caused by the AVD Manager creating the AVD's in a different directory from where the emulator was trying to launch the AVD's.
這個問題是由AVD管理器在與仿真器試圖啟動AVD的不同目錄中創建AVD引起的。
In my case, AVD Manager was initially reporting the list of existing Android Virtual Device located at C:\Users\toybuilder\Downloads\.android\avd
在我的例子中,AVD管理器最初報告的列表位於C:\Users\toybuilder\Downloads\.android\avd現有Android虛擬設備
It turns out that my Java runtime (in this case, JDK 1.6u24) was reporting C:\Users\toybuilder\Downloads as my home directory (user.home property). I first confirmed this via Eclipse:
事實證明,我的Java運行時(在這種情況下,JDK 1.6 u24)報告C:\Users\toybuilder\Downloads作為我的主目錄(用戶。家庭財產)。我首先通過Eclipse確認了這一點:
In Eclipse, go to:
在Eclipse中,至:
Eclipse Menu: Help -> About Eclipse Click on the [Installation Details] Click on the [Configuration] tab: The text box fills with an extended dump of the Eclipse environment . Look for the user.home value. In my case, the line read: user.home=C:\Users\toybuilder\Downloads
Eclipse菜單:幫助-關於Eclipse的>,單擊[安裝細節],單擊[Configuration]選項卡:文本框填充Eclipse環境的擴展轉儲。尋找用戶。房屋價值。在我的例子中,行讀:user.home=C:\Users\toybuilder\下載。
It turns out that there's a long-standing Java bug (nearly 9 years old) on how the Java runtime determine's the user.home property - as discussed elsewhere on StackOverflow
事實證明,關於Java運行時是如何確定用戶的,存在一個由來已久的Java bug(將近9年了)。家庭財產——正如在StackOverflow的其他地方所討論的那樣。
In my particular case, the buggy behavior was triggered by a bad windows folders redirection. I had apparently moved my Desktop folder into my Downloads directory at some point by accident. Although I had fixed the problem, it nevertheless left an entry in my registry with a Desktop folder redirection to the Downloads directory. There was a HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop registry key that pointed, incorrectly, to C:\Users\toybuilder\Downloads\Desktop
在我的例子中,錯誤行為是由錯誤的windows文件夾重定向觸發的。顯然,我在某個時候不小心將桌面文件夾移到了下載目錄中。盡管我已經解決了這個問題,但它仍然在我的注冊表中留下了一個條目,桌面文件夾重定向到下載目錄。微軟有一個HKEY_CURRENT_USER \ Software \ \ Windows \ CurrentVersion \ Explorer \殼文件夾\桌面指出注冊表鍵,不正確,C:\Users\toybuilder\Downloads\Desktop
The Java runtime was apparently setting user.home as "Desktop"/.. (i.e., the Downloads directory), while some other mechanisms were resolving the home directory at the correct location (probably the Windows %userprofile% environmental value) -- and hence when the emulator was starting up, it could not find the .android/avd directory, because it was looking from a different starting directory.
Java運行時顯然是在設置用戶。家為“桌面”/ . .(即。當其他一些機制在正確的位置(可能是Windows %userprofile% environmental value)解析主目錄時——因此,當模擬器啟動時,它無法找到.android/avd目錄,因為它正在從不同的開始目錄中查找。
After I deleted the incorrect redirection registry key, the problem went away.
在刪除了錯誤的重定向注冊表項后,問題就消失了。