简体   繁体   English

在Eclipse中更新ADT会导致许多错误

[英]Updating ADT in Eclipse causes many errors

Recently I updated Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools, and downloaded new APIs Android 4.4W and Android L (both API 20). 最近,我更新了Android SDK工具,Android SDK平台工具,Android SDK生成工具,并下载了新的API Android 4.4W和Android L(均为API 20)。

After restarting eclipse, it required me to also update the ADT from 22.x that I had to 23.x. 重新启动eclipse之后,它还要求我也将ADT从必须的22.x更新到23.x。

I went to Install New Software in eclipse and updated the ADT to 23.0.4. 我去Eclipse中安装新软件,并将ADT更新为23.0.4。

After restarting, I figured out nothing in Eclipse is working properly: 重新启动后,我发现Eclipse中的任何功能均无法正常工作:

  1. All the projects contains errors of several types: 所有项目都包含几种类型的错误:

    1. Unable to resolve target 'android-19' until the SDK is loaded. 在加载SDK之前无法解析目标“ android-19”。
    2. The type java.lang.Object cannot be resolved. 无法解析类型java.lang.Object。
    3. The project was not build since its build path is incomplete. 该项目尚未生成,因为其生成路径不完整。
  2. The Android SDK Manager won't open. Android SDK Manager无法打开。

  3. When I write click on a project -> properties -> Android, there're no libraries and I can't add any. 当我写一个项目->属性-> Android时,没有库,也无法添加任何库。

Never seen something like that. 从来没有见过那样的东西。 I read that more people had problems after updating the ADT but none of the solutions worked. 我了解到,更新ADT之后,更多的人遇到了问题,但是没有一种解决方案有效。 Thanks 谢谢

Some hypotheses: 一些假设:

  • Broken Android SDK + tools installation. Android SDK +工具安装失败。 -- Can you open the Android SDK Manager and the emulator outside Eclipse? -您可以在Eclipse之外打开Android SDK Manager和仿真器吗? Consider reinstalling the SDK from scratch. 考虑从头开始重新安装SDK。
  • Eclipse can't find the Android SDK + tools installation. Eclipse找不到Android SDK +工具安装。 -- Check the ADT preferences in Windows > Preferences > Android. -在Windows>偏好设置> Android中检查ADT偏好设置。 See this screen shot . 看到此屏幕截图
  • Broken ADT plug-in or its state. ADT插件损坏或其状态。 -- Try uninstalling ADT then reinstalling it. -尝试卸载ADT,然后重新安装。
  • Broken Eclipse installation. Eclipse安装失败。 -- Consider reinstalling it from scratch. -考虑从头开始重新安装。 This could be a good time to update to the latest Eclipse (Luna). 这可能是更新到最新的Eclipse(Luna)的好时机。

Actually, this is a good time to try Android Studio. 实际上,这是尝试Android Studio的好时机。 Right now your relative cost of switching is particularly low. 现在,您的相对转换成本特别低。 Android Studio will take getting used to but it's slicker, does more work for you, and is the focus of Google's Android tool development. Android Studio会逐渐适应,但它运行缓慢,可以为您做更多工作,并且是Google Android工具开发的重点。 Android Studio is in beta testing but it's stable and usable. Android Studio处于beta测试中,但稳定且可用。

Do watch the video What's new in Android development tools from Google I/O 2014. 观看视频Google I / O 2014的Android开发工具中的新增功能

See Google's notes on Troubleshooting ADT Installation . 请参阅有关ADT安装故障排除的 Google注释。

There are more tips for fixing the ADT installation, eg Eclipse Indigo Android ADT - install OK, no "Android" option in Preferences and New Project but you can rule out most of those ideas since it used to work for you. 还有更多修复ADT安装的提示,例如Eclipse Indigo Android ADT-安装“确定”,在“首选项”和“新建项目”中没有“ Android”选项,但是您可以排除大多数想法,因为它曾经为您工作。

Maybe the fix on this Ubuntu forum post is relevant. 也许此Ubuntu论坛帖子中修复程序是相关的。 There, an Ubuntu upgrade broke ADT because of the needed GEF plugin. 在那里,由于需要GEF插件,Ubuntu升级中断了ADT。

To everyone which gets this problems in the future: 对于将来遇到此问题的所有人:

Do not try to struggle with it for hours, with frustrating solutions from the internet. 互联网上令人沮丧的解决方案不要花数小时与之抗争。

Simply re-installed eclipse, ADT and android SDK in about 30 mins and everything works perfect, finally. 只需在大约30分钟内重新安装eclipse,ADT和android SDK,一切就可以完美运行了。

I am using adt-bundle-windows-x86-20140321, problem occured since updating java. 我正在使用adt-bundle-windows-x86-20140321,自更新Java以来​​出现了问题。 But now problem already fixed after re-Extracting adt-bundle-windows-x86-20140321. 但是现在,在重新提取adt-bundle-windows-x86-20140321之后,问题已经解决。

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

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