问题描述:

We do have lots of problems with our Android Apps when using SDK14/ADT14. Currently we can't build none of our complex apps with lots of libraries and dependant projects (Resources are not updated even after Clean, Refresh, Forced Save, ...). We would like to go back to SDK13/ADT13.

SDK13 is in our backup repository. But we don't have the ADT13 plugins.

How can we direct Eclipse to download the old ADT13 plugins?

Many thanks in advance.

网友答案:

I had to do this recently as well. Fortunately there's a hidden cache of old ADT versions, here's the link for the previous ADT release:

http://dl.google.com/android/ADT-12.0.0.zip

Then inside Eclipse you go to Help -> Install new software -> Add... -> Archive ... -> choose the downloaded zip. FYI: Unfortunately, you can't (or at least, I couldn't) revert to the previous SDK Manager and Tools version so easily (it insisted on getting itself upgraded before downloading the SDKs), I had to use an old copy of the folder I had lying around. Since you have SDK13 in your repo, you should be good to go.

网友答案:

You need to make sure that you've updated both the SDK AND the ADT plugin in Eclipse - I forgot to do the latter and had the problems you've described.

SDK14/ADT14 introduced a lot of changes - the old ADT won't work with the new SDK and the new ADT doesn't work with the old SDK.

If you've done both and it's still not working then moyshe's link takes you to the relevant to stuff to download (just uninstall what you have already and install the older versions)

网友答案:

Is your issue similar to this: http://code.google.com/p/android/issues/detail?id=21201

Basically each time I open Eclipse, I have to remove all library projects from all projects using them, apply changes. Then re-add them manually. Then I can start working!

It's very probable that it's related to http://code.google.com/p/android/issues/detail?id=21031.

This is serious issues and I can't believe no-one from Google has responded yet!

网友答案:

I'm posting this separate answer because of stuff I've learned from the Google Groups threads and my own experiments. I realise it's not a straight answer to the OP's question but I think it's useful here regardless.

ADT14 has changed how Android Libraries are handled in Eclipse. Instead of importing sourcecode (in LIBRARYNAME_SRC folders) it now compiles and brings over .JAR files (in a "Library Projects" folder).

To get my stuff working I built a complete new environment, installed the latest Eclipse/ADT/SDK, Imported my work and worked through all my projects from non-dependant libraries upwards - doing the following.

1 - remove all Android Libraries and 'Apply'

2 - remove all xxx_SRC folders from the Build-Path->Source tab

3 - remove any remaining xxx_SRC folders (should be empty anyway) from your Project.

4 - Add your Android Libraries back in again.

Another relates to Build Path Projects (non-Android ones). Before, ADT did not mind if you had the same Build Path Project in multiple libraries - but it sure-as-hell does now!! It crashes with "UNEXPECTED TOP LEVEL EXCEPTION"s, "java.lang.IllegalArgumentException: already added: Lcom/yourlibrarypath" and "Conversion to Dalvik Format Failed" messages.

This prevents you deploying - to solve it, go through your libraries and ensure that Projects only appear on the Build Path ONCE. I suspect that, previously, ADT actually may have need them duplicated and may even have created this duplication!?

Lastly, you have to ensure that Eclipse builds everything in the right order. Again, this didn't matter before but it's why your projects fail if you 'clean' or change anything. To do this you have 2 choices

1 - rename your projects so that they appear in alphabetical order from 'leaf' to 'root' (e.g. libraries < projects which use them).

2 - In Eclipse, use Windows->Preferences->General->Workspace->Build Order and specify all your libraries, in order. Anything not in that list is built afterwards so only libraries need be mentioned there.

Hope this helps someone

相关阅读:
Top