我有一個問題讓我的Android開發環境安裝在Windows 7中。我按照說明here,以及幾個環境子鏈接。我在Android插件中使用Eclipse。我在不同的位置安裝了Java JDK幾次(jdk-6u20-windows-i586.exe) - 但我明顯錯過了一些東西。「Android創建」呼叫失敗在Windows 7 - 缺少JDK
我每次運行的「Android創建AVD --target 2 --name my_avd」我得到一個錯誤:
C:\Users\andrew>android create avd --target 2 --name my_avd
WARNING: Java not found in your path.
Checking it it's installed in C:\Program Files\Java instead.
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java installed on your system. We
recommend that you install the JDK version of JavaSE, available here:
http://java.sun.com/javase/downloads/
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
此錯誤消息是我在安裝JDK幾次的原因。首先我嘗試安裝到我的e:驅動器上的位置。然後我將它移動到默認loc(程序文件(x86)\ java \ jdk.6.something。我也嘗試強制它進入程序文件路徑,但它仍然會自動安裝到(x86)路徑中。已經每次都將安裝路徑添加到我的路徑環境變量中,但我仍然繼續出現此錯誤。我懷疑Windows 7和安卓工具在找到JDK方面沒有很好地協作,但是誰知道呢可能是完全不同的東西。如果你以前這個錯誤看出,我將不勝感激的提示。
難道你嘗試導出JAVA_HOME環境變量? – 2010-06-16 11:35:03
是否在Windows中添加JAVA_HOME環境變量?不,我沒有。它應該讀什麼? – reuscam 2010-06-16 12:10:39