Fail to find annotations.jar after updating to ADT 23

前端 未结 9 1311
無奈伤痛
無奈伤痛 2020-12-05 12:52

So, seeing that the new Android L is out, I said I should give it a try. I installed the new ADT update from SDK tools and then from the updates. After Eclipse restart, I ge

相关标签:
9条回答
  • 2020-12-05 13:18

    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

    0 讨论(0)
  • 2020-12-05 13:25

    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

    0 讨论(0)
  • 2020-12-05 13:28

    Tomorrow I had the same problem after the update to ADT 23.

    The problem is related to the annotations.

    There are two libraries with annotations in the Android SDK:

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

    this package contains:

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

    and

    android-sdk/tools/support/annotations.jar

    that...with the new ADT update, for some reason disappeared.

    This package contains the two annotations (probably the most used :-)):

    • SupportLint
    • TargetApi

    Without them, if your code (or dependencies use them) Eclipse will complain.

    To fix this problem, we need the previous annotation.jar.

    So I downloaded the file from the link suggested by @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.

    0 讨论(0)
提交回复
热议问题