使用Eclipse配置Android SDK时出现严重问题 [英] Serious problems in Configuring Android SDK with Eclipse

查看:143
本文介绍了使用Eclipse配置Android SDK时出现严重问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Eclipse配置ADT时遇到了严重的问题。我正在使用Windows 7 Home Premium版本。

I am having serious problems in Configuring ADT with Eclipse. I am using Windows 7 Home Premium version.

我使用的Eclipse(64位)是:

The Eclipse (64 bit) that I am using is:

Eclipse Classic 3.7.1 
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604

Java代码运行没有任何问题在这个Eclipse。对于运行Android:

Java code runs without any problem in this Eclipse. For running Android:

首先,我进入Eclipse->帮助菜单,然后安装新软件。

点击添加,命名为ADT和使用的位置: http://dl-ssl.google.com/android/eclipse

at first, I went into Eclipse-> Help menu and then Install New Software.
Clicked Add, named it ADT and for location used: http://dl-ssl.google.com/android/eclipse.

出现的新窗口中,我点击了所有这些框,然后选择下一步。到目前为止,一切都OK,安装ADT,我被要求重新启动Eclipse。当Eclipse启动时,会出现一个新窗口,并要求我安装Android软件开发工具包(SDK)或选择现有的SDKs位置。我选择安装Android软件开发工具包(SDK)(我检查了所有的选项)。我已将SDK位置设置为:C:\My_Workspace\Android_SDK。一切完成后,我在Eclipse控制台中看到两个错误:

The new window that appears, I have clicked all of those boxes and choose Next. Upto this point, everything is OK, ADT is installed and I am be asked to restart Eclipse. When Eclipse launches, a new window appears and asks me to either install the Android Software Development Kit (SDK) or choose an existing SDKs location. I chose to install Android Software Development Kit (SDK) (I checked all the options). I have set SDK location to: C:\My_Workspace\Android_SDK. After everything finishes I see two errors in the Eclipse console:

[2012-01-02 14:29:37 - DDMS] DDMS files not found: C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat

[2012-01-02 14:30:47 - DDMS] DDMS files not found: C:\My_Workspace\Android_SDK\platform-tools\adb.exe C:\My_Workspace\Android_SDK\tools\hprof-conv.exe C:\My_Workspace\Android_SDK\tools\traceview.bat

请注意,我已经尝试将SDK安装在Eclipse给出的默认位置。但是我看到相同的错误。

Note, I have tried to install the SDK at the default location given by Eclipse. But I see the same errors.

如果我重新启动Eclipse,会出现一个错误:
无法在SDK中找到文件夹工具C:\ My_Workspace\Android_SDK\'。

If I restart Eclipse an error appears saying: "Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'".

如果我点击Window - > Android SDK管理器,我会收到另一条错误消息:
Android SDK尚未在首选项中设置。

If I click into Window ->Android SDK manager, I get another error message saying: "location of the Android SDK has not been setup in the preference."

如果我去Window-> Preference-> Android,我看到,SDK位置设置为C: \My_Workspace\Android_SDK
但是在顶部,有一个错误消息,说在SDK'C:\My_Workspace\Android_SDK\'中找不到文件夹'工具'。

If I go Window->Preference->Android, I see that, the SDK location is set to "C:\My_Workspace\Android_SDK" But on top, there is an error message saying, "Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'."

在C:\My_Workspace\Android_SDK\文件夹内我只看到两个子文件夹:
add-ons
platforms
但是有这些文件夹内没有任何内容。

Inside the C:\My_Workspace\Android_SDK\ folder I see only two sub folders: add-ons platforms But there is nothing inside these folders.

在C:\Users\anis_huq.android文件夹中,我看到一个名为AVD(内容为空)的文件,称为ddms 。

Inside "C:\Users\anis_huq.android" folder I see a folder called AVD (contents empty) and file called "ddms".

发生了什么?我很困惑!

What is going on? I am confused!

该帖子:在SDK内部找不到文件夹工具不帮助我的事业。

P.S. the post: Could not find folder 'tools' inside SDK does not help my cause.

推荐答案

经过1.5天的工作后,问题解决了。这是如何:

Problem solved after 1.5 days of work. This is how:

当您收到错误:

[2012-01-02 14:29:37 - DDMS] DDMS files not found:
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe 
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat

[2012-01-02 14:30:47 - DDMS] DDMS files not found:
C:\My_Workspace\Android_SDK\platform-tools\adb.exe
C:\My_Workspace\Android_SDK\tools\hprof-conv.exe
C:\My_Workspace\Android_SDK\tools\traceview.bat

转到网站: http://developer.android.com/sdk/index.html 并下载并安装;

installer_r16 -windows.exe

go to the site: http://developer.android.com/sdk/index.html and download, install;
installer_r16-windows.exe

安装完成后,你会直到看到如下错误:

After the installation, you will still see some errors like:

Fetching
https:// dl-ssl.google.com/android/repository/addons_list-1.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/addons_list-1.xml,
reason: peer not authenticated Fetched Add-ons List successfully
Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated Done loading packages. Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated

错误消息中的问题并不明显。我们认为,HTTPS实际上是导致问题的。所以,开始

The problem is not so evident from the error messages. We figured that, the HTTPS is actually causing the problem. So, start

Android SDK管理器 - >工具 - >选项,现在检查框中说:

强制https :// ...要使用http://

Android SDK Manager->Tools->Options and now CHECK the box that says:
force https://... sources to be fetched using http://

获取的源,然后单击Packages-> Reload。

and then click Packages->Reload.

一切都将按您的愿望安装!现在运行Eclipse-> Window-> Preferences-> Android,并设置新安装的Android SDK的位置(即android-sdk文件夹的位置)。你准备去了。

Everything will be installed as your wish! Now run Eclipse->Window->Preferences->Android and set the location of the newly installed Android SDK (i.e. the location of "android-sdk" folder). And you are ready to go.

为此浪费了1.5天。

这篇关于使用Eclipse配置Android SDK时出现严重问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆