programing

ADT 23으로 업데이트 한 후 annotations.jar을 찾지 못함

kingscode 2021. 1. 15. 08:27
반응형

ADT 23으로 업데이트 한 후 annotations.jar을 찾지 못함


그래서 새로운 Android L이 출시 된 것을보고 한 번 시도해 보자고했습니다. SDK 도구에서 새 ADT 업데이트를 설치 한 다음 업데이트에서 설치했습니다. Eclipse를 다시 시작한 후 \ android-sdk \ tools \ support \ annotations.jar을 찾을 수 없기 때문에 Android Dependencies를로드하지 못했다는 오류가 발생합니다.

폴더를 확인했는데 파일이 없습니다.

글쎄, 나는 ADT 업데이트가 잘 안될 수도 있다고 스스로에게 말했다. 그래서 새 이클립스 4.4가 나왔음을보고 새로 설치할 수있을 거라 생각했다. 그래서 이클립스 4.4를 다운로드하고 ADT 도구와 안드로이드 SDK를 설치했는데 같은 오류가 발생합니다.

이 문제를 해결하는 방법에 대한 아이디어가 있습니까?


Google 직원의 임시 해결책이 문제 추적기에 게시되었습니다. http://code.google.com/p/android/issues/detail?id=72419#c12

하루나 이틀 이내에 업데이트 된 버전을 기다리십시오. 그때까지 해결 방법은 다음 중 하나를 다운로드하는 것입니다.

다음 파일을 복사하십시오.

  • 도구 / hprof-conv
  • tools / support / annotations.jar
  • 도구 / 프로 가드

지원 라이브러리 제거 / 설치가 도움이되지 않았으므로 다음과 같이했습니다.

찾아서 ..\android-sdk\extras\android\support\annotations\android-support-annotations.jar복사..\android-sdk\tools\support\annotations.jar

그 이후로 문제는 사라졌습니다. 엄청나게 멋진 솔루션으로 보이지는 않지만 적어도 지금은 Eclipse에서 프로젝트를 빌드 할 수 있습니다.


프로젝트를 마우스 오른쪽 버튼으로 클릭-> project.properties->target=android-19


내일 ADT 23으로 업데이트 한 후에도 동일한 문제가 발생했습니다.

문제는 주석과 관련이 있습니다.

Android SDK에는 주석이있는 두 개의 라이브러리가 있습니다.

android-sdk / extras / android / support / annotations / android-support-annotations.jar

이 패키지에는 다음이 포함됩니다.

  • AnimRes
  • AnimatorRes
  • AnyRes
  • ArrayRes
  • AttrRes
  • BoolRes
  • ColorRes
  • DimenRes
  • DrawableRes
  • FractionRes
  • IdRes
  • IntDef
  • IntegerRes
  • InterpolatorRes
  • LayoutRes
  • MenuRes
  • NonNull
  • 널 가능
  • PluralsRes
  • RawRes
  • StringDef
  • StringRes
  • StyleRes
  • StyleableRes
  • XmlRes

android-sdk / tools / support / annotations.jar

그 ... 새로운 ADT 업데이트로 인해 어떤 이유로 사라졌습니다.

이 패키지에는 두 개의 주석이 포함되어 있습니다 (아마 가장 많이 사용되는 것 :-)).

  • SupportLint
  • TargetApi

그것들이 없다면, 당신의 코드 (또는 의존성이 그것들을 사용한다면) Eclipse는 불평 할 것입니다.

이 문제를 해결하려면 이전 annotation.jar.

그래서 @aarati가 제안한 링크에서 파일을 다운로드했습니다.

http://central.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar

Renamed it in annotation.jar and moved to: android-sdk/tools/support/

Restarting Eclipse everything will be fine.


Adding http://central.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar as annotations.jar resolved my errors


On Eclipse - After updating ADT or Updating Google SDK version, we find problem for the existing version of Google Play Service Lib.

From the help of Above answers and other search, found the following way to correct it.

From Project menu of Eclipse, uncheck 'Build Automatically'

1) Delete the existing lib project of 'google-play-services_lib'.

2) Eclipse Menu --> File --> Import --> 'Existing Android Code Into Workspace'

select the project from 'android-sdk\extras\google\google_play_services\libproject\google-play-services_lib'

3) Select the same project by checkbox in 'Project to Import'

4) Also check 'Copy projects into workspace'

5) When the project appears in 'package explorer', right click on it and select Properties.

Select 'Android'

( as solution of 'Gavin Chen' ) - select the latest platform and Api level for this library project and click OK to close properties

5) again right click on same lib project from 'Package Explorer', click on 'Build project'

Now you will find the Google Play Service Library is built properly.

Then you may build your other projects, which are dependent on it. You may also need to 'Remove' and 'Add' the google-play-service_lib, from your project -- properties -- Android -- Library.

You may re select 'Build Automatically' option from 'Project' Menu.


If you use build.gradle script, then just set the "compileSdkVersion" to 19.

... android {

compileSdkVersion 19
buildToolsVersion "19.1.0"

sourceSets {

...


You have to Update your ADT to the Latest Version!

In Eclipse go to Help

Install New Software ---> Add

inside Add Repository write:

https://dl-ssl.google.com/android/eclipse/

Double click in the opening Box the 1 entry.

Follow the Eclipse instructions.

After loading some time you will get the newest Developer Tools and NDK Plugins

Repeat this for 2 times

Tom


I have already answered it here : https://stackoverflow.com/a/25785428/2178259

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.

ReferenceURL : https://stackoverflow.com/questions/24438748/fail-to-find-annotations-jar-after-updating-to-adt-23

반응형