简体   繁体   English

如何在Eclipse中更新我的ADT?

[英]How can I update my ADT in Eclipse?

I have tried to update my Eclipse. 我试图更新我的Eclipse。 Currently I have till 2.2 Android SDK in my Eclipse. 目前我的Eclipse中有2.2 Android SDK。 Yesterday I have updated my Eclipse like this: 昨天我像这样更新了我的Eclipse:

Eclipse -> window -> Android SDK Manager -> I have checked two check-boxes from list. Eclipse - > window - > Android SDK Manager - >我已从列表中选中了两个复选框。 Tools -> Android SDK Tools and Android SDK Platform Tools. 工具 - > Android SDK工具和Android SDK平台工具。

I have posted here some last lines of the message which I get from downloading and installing: 我在这里发布了从下载和安装中获得的消息的最后几行:

Preparing to install archives 准备安装档案
Downloading Android SDK Platform-tools, revision 12 下载Android SDK平台工具,修订版12
Installing Android SDK Platform-tools, revision 12 安装Android SDK平台工具,修订版12
Stopping ADB server succeeded. 停止ADB服务器成功。
Installed Android SDK Platform-tools, revision 12 安装了Android SDK平台工具,修订版12
Downloading Android SDK Tools, revision 20 下载Android SDK工具,修订版20
Installing Android SDK Tools, revision 20 安装Android SDK工具,修订版20
[post_tools_install.bat] Updating SDK Manager.exe [post_tools_install.bat]更新SDK Manager.exe
[post_tools_install.bat] 1 file(s) copied. [post_tools_install.bat]复制了1个文件。
[post_tools_install.bat] Updating AVD Manager.exe [post_tools_install.bat]更新AVD Manager.exe
[post_tools_install.bat] 1 file(s) copied. [post_tools_install.bat]复制了1个文件。
Installed Android SDK Tools, revision 20 已安装的Android SDK工具,修订版20
Stopping ADB server succeeded. 停止ADB服务器成功。
Starting ADB server succeeded. 启动ADB服务器成功。
Done. 完成。 2 packages installed. 已安装2个包。
Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml 获取网址: https//dl-ssl.google.com/android/repository/addon.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/addon.xml , reason: dl-ssl.google.com 无法获取网址https://dl-ssl.google.com/android/repository/addon.xml ,原因:dl-ssl.google.com
Fetching URL: http://software.intel.com/sites/landingpage/android/addon.xml 获取URL: http//software.intel.com/sites/landingpage/android/addon.xml
Failed to fetch URL http://software.intel.com/sites/landingpage/android/addon.xml , reason: software.intel.com 无法获取URL http://software.intel.com/sites/landingpage/android/addon.xml ,原因:software.intel.com
Done loading packages. 完成装载包。

But after all this after I have closed Eclipse and again wanted to start, it throw the error: 但毕竟在我关闭Eclipse并再次想要启动之后,它会抛出错误:

This Android SDK requires Android Developer Toolkit version 20.0.0 or above. 此Android SDK需要Android Developer Toolkit 20.0.0或更高版本。 Current version is 16.0.0.v201203301601-306762. 当前版本为16.0.0.v201203301601-306762。 Please update ADT to the latest version. 请将ADT更新到最新版本。

In preferences I received this error: 在偏好中我收到此错误:

This Android SDK requires Android Develop... Please update ADT to the latest version. 此Android SDK需要Android Develop ...请将ADT更新到最新版本。

You have updated the android sdk but not updated the adt to match with it. 你已经更新了android sdk但没有更新adt以匹配它。

You can update the adt from here 您可以从此处更新adt

You might need to update the software source for your adt update 您可能需要更新adt更新的软件源

Go to eclipse > help > Check for updates. 转到eclipse> help>检查更新。

It should list the latest update of adt. 它应该列出adt的最新更新。 If it is not working try the same *Go to eclipse > help > Install new software * but now please do the follwing: 如果它不工作尝试相同*转到eclipse>帮助>安装新软件*但现在请执行以下操作:

It will list the updates available- which should ideally be adt 20.xx 它将列出可用的更新 - 理想情况下应为adxx 20.xx

Eclipse will restart and hopefully everything should work fine for you. Eclipse将重新启动 ,希望一切都能正常工作。

I had this problem. 我有这个问题。 Since I already had the ADT address I could not follow the suggested fix. 由于我已经有了ADT地址,因此我无法遵循建议的修复方法。 The reason why the update was not working in my case is that the ADT address was not checked in the list of "Available updates". 在我的情况下更新不起作用的原因是未在“可用更新”列表中检查ADT地址。

1) Go to eclipse > help > Install new software 1)转到eclipse> help>安装新软件

2) Click on "Available Software site" 2)点击“可用软件站点”

3) Check that you have the ADT address 3)检查您是否有ADT地址

4) If not add it following the Murtuza Kabul's steps 4)如果不按照Murtuza Kabul的步骤添加它

5) if yes check that the address is checked (checkbox on the left of the address) 5)如果是,请检查地址是否已选中(地址左侧的复选框)

I run the update after having launched Eclipse as administrator to be sure that it was not going to have problems accessing the system folders 我以管理员身份启动Eclipse后运行更新,以确保访问系统文件夹时不会出现问题

I viewed the Eclipse ADT documentation and found out the way to get around this issue. 我查看了Eclipse ADT文档并找到了解决此问题的方法。 I was able to Update My SDK Tool to 22.0.4 (Latest Version). 我能够将我的SDK工具更新到22.0.4(最新版本)。

Solution is : First Update ADT to 22.0.4 and then Update SDK Tool to 22.0.4 解决方案是 :首先将ADT更新到22.0.4,然后将SDK工具更新到22.0.4

The above link says, 上面的链接说,

ADT 22.0.4 is designed for use with SDK Tools r22.0.4 . ADT 22.0.4设计用于SDK Tools r22.0.4 If you haven't already installed SDK Tools r22.0.4 into your SDK, use the Android SDK Manager to do so 如果您尚未在SDK中安装SDK Tools r22.0.4,请使用Android SDK Manager执行此操作

What I had to do was update my ADT to 22.0.4 (Latest Version) and then I was able to update SDK tool to 22.0.4 . 我要做的是将我的ADT更新到22.0.4(最新版本)然后我能够将SDK工具更新到22.0.4 I thought only SDK Tool has been updated not ADT, so I was updating the SDK Tool with Older ADT Version (22.0.1). 我以为只有SDK工具已经更新而不是ADT,所以我用旧版ADT版本(22.0.1)更新了SDK工具。

How to Update your ADT to Latest Version 如何将ADT更新到最新版本

  1. In Eclipse go to Help 在Eclipse中转到Help

  2. Install New Software ---> Add Install New Software ---> Add

  3. inside Add Repository write the Name: ADT (or whatever you want) 在Add Repository中写下Name: ADT (或任何你想要的)

  4. Location: https://dl-ssl.google.com/android/eclipse/ 位置: https://dl-ssl.google.com/android/eclipse/https://dl-ssl.google.com/android/eclipse/

  5. after loading you should get Developer Tools and NDK Plugins 加载后,您应该获得开发人员工具和NDK插件

  6. check both if you want to use the Native Developer Kit (NDK) in the future or check 检查以后是否要使用Native Developer Kit(NDK)或检查

  7. Developer Tool only 仅限开发者工具

  8. click Next 点击下一步

  9. Finish

In my case opening 'Help' >> "Install New Software" had no entries for any URLs (previous url's were not there) - so I Manually added 'em. 在我的情况下,打开“帮助”>>“安装新软件”没有任何URL的条目(以前的网址不存在) - 所以我手动添加了他们。 And updated ... and Voilaaaa !! 并更新......和Voilaaaa !! Above posts have been very helpful in resolving this issue for me. 以上帖子对我解决这个问题非常有帮助。

以管理员身份运行然后关注其他评论为我解决了问题:)

Reason to that is with the new update, they changed the URL for the Android Developer Tools update site to require HTTPS. 原因是新更新后,他们将Android Developer Tools更新站点的URL更改为需要HTTPS。 If you are updating ADT, make sure you use HTTPS in the URL for the Android Developer Tools update site. 如果要更新ADT,请确保在Android Developer Tools更新站点的URL中使用HTTPS。

I had the same problem where there's no files under Generated Java files, BuildConfig and R.java were missing. 我遇到了同样的问题,即生成的Java文件下没有文件,BuildConfig和R.java都丢失了。 The automatic build option is not generating. 自动构建选项未生成。
In Eclipse under Project, uncheck Build Automatically. 在Project下的Eclipse中,取消选中Build Automatically。 Then under Project select Build Project. 然后在Project下选择Build Project。 You may need to fix the projec 您可能需要修复项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM