我知道这个问题已被打死,但我仍然无法让SDK管理器在我的Windows 7 Home上运行。Android.bat无法运行java
我下载了eclipse + adt包。 SDK Manager.exe位于sdk文件夹中,我尝试从中运行它。我甚至试图将它复制到工具文件夹,并尝试从那里运行,但没有运气。
我得到的错误是:
Failed to execute tools\android.bat:
The system cannot find the file specified.
文件明显存在。我试着以“管理员”身份运行它。
下一个我试图运行它说的android.bat文件本身:
Windows cannot find 'E:\path\to\batfile'.
Make sure you typed the name correctly, and then try again.
然后我跑了它作为“管理员”其中至少检测并试图执行它。我在几个暂停语句中添加了android.bat本身,以防止它关闭。
这是我所看到的:
'"E:\ADT\sdk\tools\lib\\find_java.exe" -s' is not recognized as an internal
or external command, operable program or batch file.
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel/System/Avanced System Settings to point to the
JDK folder.
不知道为什么它说,因为当我在何处运行的Java在cmd中我得到这个:
C:\Users\(MyUser)>where java
C:\Program Files\Java\jdk1.8.0_05\bin\java.exe
C:\ProgramData\Oracle\Java\javapath\java.exe
C:\Windows\System32\java.exe
当我打开cmd并手动运行
'"E:\ADT\sdk\tools\lib\\find_java.exe" -s'
它工作正常。
我又试图在android.bat的java_exe设置为
set java_exe=C:\Program Files\Java\jdk1.8.0_05\bin\java.exe
注释掉我再次运行它find_java之后,这是我所得到的:
'"C:\Program Files\Java\jdk1.8.0_05\bin\java.exe" -jar lib\archquery.jar' is not
recognized as an internal or external command,
operable program or batch file.
Invalid path
并再次,当我手动运行它,我得到:
C:\Users\MyUser>"C:\Program Files\Java\jdk1.8.0_05\bin\java.exe" -jar E:\ADT\sdk\t
ools\lib\archquery.jar
x86_64
我错过了什么,或者我应该最终放弃尝试让它在我的Windows机器上工作。
出于好奇。你有JAVA_HOME集,并指向主要的SDK目录? (不是bin,上面的那个) – fdreger 2014-11-02 20:17:40
是的,它设置为C:\ Program Files \ Java \ jdk1.8.0_05 – AsadSMalik 2014-11-02 21:52:07