Java 使用 Android 开发工具 v. 23 更新 Eclipse

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24437564/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 12:12:31  来源:igfitidea点击:

Update Eclipse with Android development tools v. 23

javaandroideclipseadt

提问by greywolf82

I updated Eclipse with the new SDK tools (rev. 23), but now when Eclipse starts I receive the error:

我使用新的 SDK 工具(修订版 23)更新了 Eclipse,但是现在当 Eclipse 启动时,我收到错误消息:

This Android SDK requires Android Developer Toolkit version 23.0.0 or above. Current version is 22.6.3.v201404151837-1123206. Please update ADT to the latest version.

此 Android SDK 需要 Android Developer Toolkit 23.0.0 或更高版本。当前版本为 22.6.3.v201404151837-1123206。请将 ADT 更新到最新版本。

No updates were found with "Check for updates". If I try "Install new software", I can see version 23, but I can't upgrade due to the following error:

没有找到“检查更新”的更新。如果我尝试“安装新软件”,我可以看到版本 23,但由于以下错误而无法升级:

Cannot complete the install because of a conflicting dependency.
Software being installed: Android Development Tools 23.0.0.1245622 (com.android.ide.eclipse.adt.feature.feature.group 23.0.0.1245622)
Software currently installed: Android Developer Tools 22.2.1.v201309180102-833290 (com.android.ide.eclipse.adt.package.product 22.2.1.v201309180102-833290)
Only one of the following can be installed at once: 
    ADT Package 22.6.3.v201404151837-1123206 (com.android.ide.eclipse.adt.package 22.6.3.v201404151837-1123206)
    ADT Package 23.0.0.1245622 (com.android.ide.eclipse.adt.package 23.0.0.1245622)
Cannot satisfy dependency:
    From: Android Development Tools 23.0.0.1245622 (com.android.ide.eclipse.adt.feature.feature.group 23.0.0.1245622)
    To: com.android.ide.eclipse.adt.package [23.0.0.1245622]
Cannot satisfy dependency:
    From: Android Development Tools 22.6.3.v201404151837-1123206 (com.android.ide.eclipse.adt.feature.group 22.6.3.v201404151837-1123206)
    To: com.android.ide.eclipse.adt.package [22.6.3.v201404151837-1123206]
Cannot satisfy dependency:
    From: ADT Package 22.2.1.v201309180102-833290 (com.android.ide.eclipse.adt.package.feature.group 22.2.1.v201309180102-833290)
    To: com.android.ide.eclipse.adt.feature.group 22.2.0
Cannot satisfy dependency:
    From: Android Developer Tools 22.2.1.v201309180102-833290 (com.android.ide.eclipse.adt.package.product 22.2.1.v201309180102-833290)
    To: com.android.ide.eclipse.adt.package.feature.group [22.2.1.v201309180102-833290]

After download of the last ADT from the web site, it seems there's another problem.

从网站下载最后一个ADT后,似乎还有另一个问题。

With SDK Tools rev. 23 proguard is not installed, the folder SDK dir/tools/proguardis missing, and other tools are missing. This version contains several bugs.

使用 SDK 工具版本。23 proguard没有安装,文件夹SDKdir/tools/proguard丢失,其他工具丢失。此版本包含几个错误。

采纳答案by greywolf82

Google response:

谷歌回应

This is a packaging bug. The entire proguard file is missing. We'll have an update asap, but until then just copy it over from a previous version of the tools:

这是一个打包错误。整个 proguard 文件丢失。我们将尽快进行更新,但在那之前只需从以前版本的工具中复制它:

and copy over the following files:

并复制以下文件:

  • tools/hprof-conv
  • tools/support/annotations.jar
  • tools/proguard
  • 工具/ hprof-conv
  • 工具/支持/annotations.jar
  • 工具/保护

So at the end if you started from a new ADT copy by hand the files :)

所以最后,如果你从一个新的 ADT 手动复制文件开始:)

Edit:with the latest ADT release, the bundle should now work with auto-update, so install these new versions:

编辑:使用最新的 ADT 版本,该包现在应该可以自动更新,所以安装这些新版本

Don't try to upgrade from previous versionbecause it doesn't work at all. If you have got problems with zipalign, it's now under build-tools and no more under tools/ so you can do a symbolic link or just copy it into the expected folder.

不要尝试从以前的版本升级,因为它根本不起作用。如果您在使用 zipalign 时遇到问题,它现在位于 build-tools 下,而不再位于 tools/ 下,因此您可以执行符号链接或将其复制到预期的文件夹中。

回答by Daniel Diaz

Google has released ADT v23.0.2. This solved many problems of previous ADT version 23.

谷歌发布了 ADT v23.0.2。这解决了以前 ADT 版本 23 的许多问题。

Step-by-step:

一步步:

  • Menu Help → Install New Software...
  • For "Work with", select the Android source https://dl-ssl.google.com/android/eclipseWork with Android source
  • Tick ADT v23.0 for installation, then click "Next"
  • Eclipse will show "Install Remediation Page" since there is conflict with previous version. (If it does not, see below.) Select "Update my installation to be compatible with items being installed" to uninstall the old version and install the new one. After that, proceed with the usual steps.
  • 菜单帮助 → 安装新软件...
  • 对于“Work with”,选择 Android 源 https://dl-ssl.google.com/android/eclipse使用 Android 源
  • 安装时勾选ADT v23.0,然后点击“下一步”
  • Eclipse 将显示“安装修复页面”,因为与以前的版本存在冲突。(如果没有,请参见下文。)选择“更新我的安装以与正在安装的项目兼容”以卸载旧版本并安装新版本。之后,继续执行通常的步骤。

Install remediation page

安装修复页面

Note: When I installed the new version of ADT, I didn't include the new version of "Android Native Development Tools" package. Instead, I installed the rest of packages first, and then installed "Android Native Development Tools". For a reason, if I try to install all the new packages including "Android Native Development Tools", the installation fails.

注意:我安装新版ADT时,没有包含新版“Android Native Development Tools”包。相反,我先安装了其余的包,然后安装了“Android Native Development Tools”。出于某种原因,如果我尝试安装包括“Android Native Development Tools”在内的所有新软件包,安装将失败。

If there is no "Remediation page", the only way to remove the ADT plugin from Eclipse is to go to menu HelpAbout EclipseInstallation Detailsand uninstall from there. But there is a risk of uninstalling Eclipse itself.

如果没有“修复页面”,从 Eclipse 中删除 ADT 插件的唯一方法是转到菜单HelpAbout EclipseInstallation Details并从那里卸载。但是存在卸载 Eclipse 本身的风险。

回答by bluewhile

For me it helped to delete Android 4.4W which is also API 20 and might be a cause for the conflict. So only install Android 4.4W or Android L until they fix it.

对我来说,它有助于删除 Android 4.4W,它也是 API 20,可能是导致冲突的原因。所以只安装 Android 4.4W 或 Android L,直到他们修复它。

And (again this might only be for me) it only works in Android Studio not in Eclipse ...

而且(同样这可能只适合我)它只能在 Android Studio 中而不在 Eclipse 中工作......

回答by Rajat Sharma

I have done following to resolve an issue.

我已完成以下操作以解决问题。

  1. Go to http://developer.android.com/sdk/installing/installing-adt.htmland download the latest ADT ZIP file (at the bottom of page).

  2. Go to Eclipse → menu HelpAbout EclipseInstallation details

  3. Delete Android DDM, Android Development Tools, Hierarchy Viewer, Native Development Tools, TraceView, etc., 22.X version.

  4. Menu Help* → Install New SoftwareAddArchive→ *Select the downloaded ZIP file in step 1.

  5. Select all the latest version of all 23 which I have deleted in step 3 and accept the license agreement.

  1. 转到http://developer.android.com/sdk/installing/installing-adt.html并下载最新的 ADT ZIP 文件(在页面底部)。

  2. 转到 Eclipse → 菜单帮助关于 Eclipse安装详细信息

  3. 删除Android DDM、Android Development Tools、Hierarchy Viewer、Native Development Tools、TraceView等,22.X版本

  4. 菜单帮助* →安装新软件添加存档→ *在步骤 1 中选择下载的 ZIP 文件。

  5. 选择我在步骤 3 中删除的所有 23 个的所有最新版本并接受许可协议。

Restart Eclipse, and it fixes my issue.

重新启动 Eclipse,它解决了我的问题。

回答by stevyhacker

On ADT-bundled Eclipse I had to first uninstall the ADT and then do a fresh install.

在 ADT 捆绑的 Eclipse 上,我必须先卸载 ADT,然后重新安装。

To remove the ADT plugin from Eclipse:

从 Eclipse 中删除 ADT 插件:

  • Go to menu HelpAbout EclipseInstallation Details.
  • Select ADT plug-in, then click Uninstall.
  • After uninstallation install ADT from Help → Install new software.
  • 转到菜单HelpAbout EclipseInstallation Details
  • 选择 ADT 插件,然后单击卸载。
  • 卸载后从帮助 → 安装新软件安装 ADT。

回答by Biljana

DO NOT DO THIS

不要这样做

Warning: Please see the comments below this answer. These steps have had a negative impact for many people.

警告:请参阅此答案下方的评论。这些步骤对许多人产生了负面影响。

  1. Click Help / Install new software...
  2. Click on What is "already installed" (as in picture below)
  3. In the new window you can uninstall the old ADT (uninstall Android Development Tools, Android DDMS, Android Hierarchy Viewer, Android TraceView, Android Native Development Tools and Tracer for OpenGL ES)
  4. Restart Eclipse
  5. Then again click on Help / Install New Software
  6. Choose ADT... Install
  1. 单击帮助/安装新软件...
  2. 点击什么是“已经安装”(如下图)
  3. 在新窗口中您可以卸载旧的 ADT(卸载 Android Development Tools、Android DDMS、Android Hierarchy Viewer、Android TraceView、Android Native Development Tools 和 Tracer for OpenGL ES)
  4. 重启 Eclipse
  5. 然后再次单击帮助/安装新软件
  6. 选择 ADT... 安装

I hope it helps!

我希望它有帮助!

Picture Demonstration

图片演示

回答by RED_

I had to delete ADT and install it again.

我不得不删除 ADT 并重新安装它。

However be warned, this caused me and one other person to have an annotations.jar missing errors in the Java Build path for certain projects, probably because it was trying to look for an old SDK, so upgrading projects is the next step I have to take.

但是请注意,这导致我和另一个人在某些项目的 Java Build 路径中缺少 annotations.jar 错误,可能是因为它试图寻找旧的 SDK,所以升级项目是我必须要做的下一步拿。

The errors relate to libraries mostly, Google Play Services, Facebook SDK, ActionBarCompat.

错误主要与库、Google Play 服务、Facebook SDK、ActionBarCompat 相关。

For this step, you uninstall ADT, then put the URL back in to download them. The url is: https://dl-ssl.google.com/android/eclipse

对于这一步,您卸载 ADT,然后将 URL 放回以下载它们。网址是:https://dl-ssl.google.com/android/eclipse

回答by dennisdrew

None of the other answers worked for me using the ADT bundle published on developer.android.com.

使用 developer.android.com 上发布的 ADT 包,其他答案都不适合我。

I ended up downloading the latest version of Eclipse (not the ADT bundle) and then installing the ADT plugin via menu HelpInstall new software→ entering https://dl-ssl.google.com/android/eclipse(mentioned by @RED_).

我最终下载了最新版本的 Eclipse(不是 ADT 包),然后通过菜单帮助安装新软件→ 输入https://dl-ssl.google.com/android/eclipse(@RED_ 提到)安装 ADT 插件。

I also had to update my workspace to point to my previous workspace, and most things seemed to be restored.

我还必须更新我的工作区以指向我以前的工作区,并且大多数事情似乎都已恢复。

On a side note: This seems like a good time to migrate to Android Studio...

附带说明:这似乎是迁移到 Android Studio 的好时机......

回答by Samuel C?té

I found a solution for the problem with "conflicting dependency". I don't have the same page of Daniel Díaz's response, but a page show "conflicting dependency", and I can't make anything.

我找到了“冲突依赖”问题的解决方案。我没有 Daniel Díaz 回复的同一页面,但页面显示“冲突依赖”,我无法做任何事情。

The problem is that I'm not the owner of the file. Eclipse was installed in other session (on OS X). I have the right to read and write the Eclipse file, but I'm not the owner. Make a "chown" command on all Eclipse files to solve the problem. After, I have the same result as Daniel Diaz.

问题是我不是文件的所有者。Eclipse 安装在其他会话中(在 OS X 上)。我有权读写 Eclipse 文件,但我不是所有者。对所有 Eclipse 文件执行“chown”命令以解决问题。之后,我得到了与 Daniel Diaz 相同的结果。

I hope this helps someone.

我希望这可以帮助别人。

回答by Hrushikesh

  • Just uninstall the previous ADT.
  • Go to menu HelpAbout EclipseInstallation Details
  • Uninstall all plugins which Id start with com.android.ide
  • Install ADT again from the update site.
  • 只需卸载以前的 ADT。
  • 转到菜单帮助关于 EclipseInstallation Details
  • 卸载所有以 com.android.ide 开头的插件
  • 从更新站点再次安装 ADT。

回答by bond

If you install a new Eclipseversion it will work. Here's what I did:

如果您安装新的Eclipse版本,它将起作用。这是我所做的:

  1. Installed the new Eclipse version, Luna
  2. Made a backup of the current workspace.
  3. Ran the new Eclipse, Luna, and updated the workspace
  4. Installed the ADT plugin(Help -> Install New Software)
  5. Restarted Eclipse
  6. Done
  1. 安装了新的Eclipse版本,Luna
  2. 对当前工作区进行了备份。
  3. 运行新的 Eclipse、Luna 并更新工作区
  4. 安装ADT 插件(帮助 -> 安装新软件)
  5. 重启 Eclipse
  6. 完毕