问题
I am trying to update my Android SDK Tools to 17 rev. and I updated usign SDK Tools but in Properties/library ;
But the fact that in the support folder there is a annotations.jar already. What should I do to fix it?
回答1:
I had the same problem. I went to the SDK Manager within eclipse (Window --> Android SDK Manager) and installed the Android Support package which is found in the Extras folder. After the install the error was gone (at least in my system)
回答2:
So, when i updated sdk to L version i had same problem. But after Extra folders updating in SDK Manager i didn't find annotation.jar file. Maybe Google bug with new SDK version. So i copied annotation.jar file from old SDK folder (folder half a year ago)
回答3:
Right click onto your project, in context menu choose Properties, your will see a window. Second line is Android - click onto it. You will see list of installed SDK. Check any SDK which has API level 16 or more.
annotationas.jar is embedded in SDK of 16 API level and after it.
回答4:
What worked for me was downloading the annotations.jar file, and then adding that to where it was supposed to be according to the error.
It can be downloaded here: http://mvnrepository.com/artifact/com.google.android/annotations/4.1.1.4
回答5:
After updating all of the packages in the SDK manager you may need to update Android Developer toolkit also. Eclipse -> Help -> Check Updates -> Install
回答6:
I think Google has changed the location of that jar file from <SDK_DIR>/extras/android/support/annotations.jar
to <SDK_DIR>/extras/android/support/annotations/android-support-annotations.jar
To solve this issue, I followed these steps on all projects and libraries in my workspace using this jar:
- Just removed the file from
Java Build Path -> Libray
Tab, - then
Add External Jars
- Chose file from the given location above.
回答7:
I had this issue just now, and this was the top result in Google. Posting my results for time-traveling Googlers from the future.
Jose's solution didn't work for me, as there was no "Extras" folder, nor "Android Support" package, in my update manager, so things must have changed within the past two years.
Here's what did work for me: update all of the packages in the SDK manager. I don't know which update in particular fixed it, but now that they are all up-to-date, the problem is solved.
来源:https://stackoverflow.com/questions/10061986/missing-annotations-jar