Android 如何在 Eclipse 中更新我的 ADT?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12634568/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I update my ADT in Eclipse?
提问by himAndroid
I have tried to update my Eclipse. Currently I have till 2.2 Android SDK in my Eclipse. Yesterday I have updated my Eclipse like this:
我试图更新我的 Eclipse。目前我的 Eclipse 中只有 2.2 Android SDK。昨天我像这样更新了我的 Eclipse:
Eclipse -> window -> Android SDK Manager -> I have checked two check-boxes from list. Tools -> Android SDK Tools and Android SDK Platform Tools.
Eclipse -> 窗口 -> Android SDK 管理器 -> 我从列表中选中了两个复选框。工具 -> 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
Installing Android SDK Platform-tools, revision 12
Stopping ADB server succeeded.
Installed Android SDK Platform-tools, revision 12
Downloading Android SDK Tools, revision 20
Installing Android SDK Tools, revision 20
[post_tools_install.bat] Updating SDK Manager.exe
[post_tools_install.bat] 1 file(s) copied.
[post_tools_install.bat] Updating AVD Manager.exe
[post_tools_install.bat] 1 file(s) copied.
Installed Android SDK Tools, revision 20
Stopping ADB server succeeded.
Starting ADB server succeeded.
Done. 2 packages installed.
Fetching URL: 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
Fetching 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
Done loading packages.
准备安装档案
下载 Android SDK Platform-tools,修订版 12
安装 Android SDK Platform-tools,修订版 12 已
成功停止 ADB 服务器。
已安装 Android SDK 平台工具,修订版 12
下载 Android SDK 工具,修订版 20
安装 Android SDK 工具,修订版 20
[post_tools_install.bat] 更新 SDK Manager.exe
[post_tools_install.bat] 已复制 1 个文件。
[post_tools_install.bat] 正在更新 AVD Manager.exe
[post_tools_install.bat] 已复制 1 个文件。
已安装 Android SDK Tools,修订版 20
停止 ADB 服务器成功。
启动 ADB 服务器成功。
完毕。安装了2个包。
获取 URL:https://dl-ssl.google.com/android/repository/addon.xml
无法获取 URL https://dl-ssl.google.com/android/repository/addon.xml,原因:dl- ssl.google.com
获取 URL:http: //software.intel.com/sites/landingpage/android/addon.xml
无法获取 URL http://software.intel.com/sites/landingpage/android/addon.xml,原因:software.intel.com
完成加载包。
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. Current version is 16.0.0.v201203301601-306762. Please update ADT to the latest version.
此 Android SDK 需要 Android Developer Toolkit 20.0.0 或更高版本。当前版本为 16.0.0.v201203301601-306762。请将 ADT 更新到最新版本。
In preferences I received this error:
在首选项中,我收到此错误:
This Android SDK requires Android Develop... Please update ADT to the latest version.
此 Android SDK 需要 Android 开发...请将 ADT 更新到最新版本。
回答by Murtuza Kabul
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
您可以从这里更新广告
You might need to update the software source for your adt update
您可能需要为您的 adt 更新更新软件源
Go to eclipse > help > Check for updates.
转到 eclipse > 帮助 > 检查更新。
It should list the latest update of adt. If it is not working try the same *Go to eclipse > help > Install new software * but now please do the follwing:
它应该列出 adt 的最新更新。如果它不起作用,请尝试相同的 *转到 eclipse > 帮助 > 安装新软件 * 但现在请执行以下操作:
Click on add
Add this url : https://dl-ssl.google.com/android/eclipse/
Give it any name.
点击添加
给它任何名字。
It will list the updates available- which should ideally be adt 20.xx
它将列出可用的更新 - 理想情况下应该是 adt 20.xx
Eclipse will restartand hopefully everything should work fine for you.
Eclipse 将重新启动,希望一切正常。
回答by kingston
I had this problem. Since I already had the ADTaddress I could not follow the suggested fix. 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地址,所以我无法遵循建议的修复程序。在我的情况下更新不起作用的原因是在“可用更新”列表中没有检查 ADT 地址。
1) Go to eclipse > help > Install new software
1)转到eclipse>帮助>安装新软件
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 后运行更新,以确保访问系统文件夹不会出现问题
回答by Pratik Butani
I viewed the Eclipse ADT documentationand found out the way to get around this issue. I was able to Update My SDK Tool to 22.0.4 (Latest Version).
我查看了Eclipse ADT 文档并找到了解决此问题的方法。我能够将我的 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 Tool 更新为 22.0.4
The above link says,
上面的链接说,
ADT 22.0.4is designed for use with 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
ADT 22.0.4旨在与SDK Tools r22.0.4 一起使用。如果您尚未将 SDK Tools r22.0.4 安装到您的 SDK 中,请使用 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. I thought only SDK Tool has been updated not ADT, so I was updating the SDK Tool with Older ADT Version (22.0.1).
我必须做的是将我的 ADT 更新到 22.0.4(最新版本),然后我能够将SDK 工具更新到 22.0.4。我以为只更新了 SDK 工具而不是 ADT,所以我用旧的 ADT 版本(22.0.1)更新了 SDK 工具。
How to Update your ADT to Latest Version
如何将您的 ADT 更新到最新版本
In Eclipse go to
Help
Install New Software
--->Add
inside Add Repository write the Name:
ADT
(or whatever you want)Location:
https://dl-ssl.google.com/android/eclipse/
after loading you should get Developer Tools and NDK Plugins
check both if you want to use the Native Developer Kit (NDK) in the future or check
Developer Tool only
click Next
Finish
在 Eclipse 中转到
Help
Install New Software
--->Add
在 Add Repository 中写下名称:(
ADT
或任何你想要的)地点:
https://dl-ssl.google.com/android/eclipse/
加载后你应该得到开发者工具和 NDK 插件
如果您想在将来使用 Native Developer Kit (NDK),请检查两者或检查
仅限开发者工具
点击下一步
结束
回答by LeRoy
Running as administrator then following other comments fixed the problem for me :)
以管理员身份运行然后按照其他评论为我解决了这个问题:)
回答by fatihkaradag
Reason to that is with the new update, they changed the URL for the Android Developer Tools update site to require HTTPS. If you are updating ADT, make sure you use HTTPS in the URL for the Android Developer Tools update site.
原因是在新的更新中,他们将 Android 开发者工具更新站点的 URL 更改为需要 HTTPS。如果您要更新 ADT,请确保在 Android 开发人员工具更新站点的 URL 中使用 HTTPS。
回答by MahaKun
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. And updated ... and Voilaaaa !! Above posts have been very helpful in resolving this issue for me.
在我的情况下,打开“帮助”>>“安装新软件”没有任何 URL 条目(以前的 URL 不存在) - 所以我手动添加了它们。并更新......和瞧!以上帖子对我解决这个问题非常有帮助。
回答by mcwong
I had the same problem where there's no files under Generated Java files, BuildConfig and R.java were missing. The automatic build option is not generating.
In Eclipse under Project, uncheck Build Automatically. Then under Project select Build Project. You may need to fix the projec
我遇到了同样的问题,在 Generated Java files 下没有文件,BuildConfig 和 R.java 丢失。未生成自动构建选项。
在 Eclipse 下的 Project 中,取消选中 Build Automatically。然后在 Project 下选择 Build Project。您可能需要修复项目