简体   繁体   中英

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).

After restarting eclipse, it required me to also update the ADT from 22.x that I had to 23.x.

I went to Install New Software in eclipse and updated the ADT to 23.0.4.

After restarting, I figured out nothing in Eclipse is working properly:

  1. All the projects contains errors of several types:

    1. Unable to resolve target 'android-19' until the SDK is loaded.
    2. The type java.lang.Object cannot be resolved.
    3. The project was not build since its build path is incomplete.
  2. The Android SDK Manager won't open.

  3. When I write click on a project -> properties -> Android, there're no libraries and I can't add any.

Never seen something like that. I read that more people had problems after updating the ADT but none of the solutions worked. Thanks

Some hypotheses:

  • Broken Android SDK + tools installation. -- Can you open the Android SDK Manager and the emulator outside Eclipse? Consider reinstalling the SDK from scratch.
  • Eclipse can't find the Android SDK + tools installation. -- Check the ADT preferences in Windows > Preferences > Android. See this screen shot .
  • Broken ADT plug-in or its state. -- Try uninstalling ADT then reinstalling it.
  • Broken Eclipse installation. -- Consider reinstalling it from scratch. This could be a good time to update to the latest Eclipse (Luna).

Actually, this is a good time to try 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 is in beta testing but it's stable and usable.

Do watch the video What's new in Android development tools from Google I/O 2014.

See Google's notes on Troubleshooting ADT Installation .

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.

Maybe the fix on this Ubuntu forum post is relevant. There, an Ubuntu upgrade broke ADT because of the needed GEF plugin.

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.

I am using adt-bundle-windows-x86-20140321, problem occured since updating java. But now problem already fixed after re-Extracting adt-bundle-windows-x86-20140321.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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