Eclipse中的Android SDK Manager找不到路径

时间:2014-03-08 02:38:28

标签: java android eclipse

当我在eclipse中打开sdk管理器时,错误。

[SDK Manager] 'C:\Program' is not recognized as an internal or external command, operable program or batch file.
[SDK Manager] Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
[SDK Manager]  at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:351)
[SDK Manager]  at com.android.sdkmanager.Main.doAction(Main.java:325)
[SDK Manager]  at com.android.sdkmanager.Main.run(Main.java:125)
[SDK Manager]  at com.android.sdkmanager.Main.main(Main.java:108)
[SDK Manager] Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
[SDK Manager]  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[SDK Manager]  at java.security.AccessController.doPrivileged(Native Method)
[SDK Manager]  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[SDK Manager]  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[SDK Manager]  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[SDK Manager]  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[SDK Manager]  ... 4 more

这是我的电脑配置。

ANDROID_SDK_HOME - C:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk

ANDROID_SWT - %ANDROID_SDK_HOME%\tools\lib\x86_64

CLASS_PATH - .;%JAVA_HOME%\lib\tools.jar

JAVA_HOME - C:\Program Files\Java\jdk1.6.0_35

路径 -

C:\Windows\System32;%JAVA_HOME%\bin;%ANDROID_SDK_HOME%\platform-tools;%SystemRoot%system32;%SystemRoot%;C:\Program Files\Java\jdk1.6.0_35\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\MATLAB\R2010a\runtime\win64;C:\Program Files\MATLAB\R2010a\bin;C:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools

.android文件位于

C:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk

eclipse文件位于

C:\Android\eclipse-jee-kepler-SR2-win32-x86_64\eclipse

jdk和jre文件位于

C:\Program Files\Java

有什么问题?

1 个答案:

答案 0 :(得分:1)

第一行显示它无法找到C:\ Program,这就是它给出错误的原因。 您的路径中有一个空格但它被解析为两个单独的单词C:\ProgramFiles

为避免这种情况,根据您的Windows版本,您可以在设置JAVA_HOME时使用这些参数:

%programfiles(x86)%\Java\jdk1.6.0_35

%programfiles%\Java\jdk1.6.0_35