0

I have downloaded facebook(project) and I am getting a error android.support.annotation.Nullable( cannot be resolved). Following this link android.annotation cannot be resolved. They mentioned there is 2 annotations jar files. I have this one android-sdk/tools/support/annotations.jar but I don't have this one android-sdk/extras/android/support/annotations/annotations.jar. (and this one has the •Nullable that I require) What is the correct way to add this to my eclipse

Community
  • 1
  • 1
Charl Potgieter
  • 201
  • 5
  • 13

1 Answers1

0

Add this code in your build.gradle file

dependencies {
    compile 'com.android.support:support-annotations:22.2.0'
}
Sushil
  • 147
  • 1
  • 9
  • I have added it and cleaned my project, still nothing has changed should I do something else? – Charl Potgieter Aug 11 '15 at 12:54
  • Which IDE you are using Android studio or Eclipse? 1. If you are using eclipse you need to add the android-library project in you application. – Sushil Aug 11 '15 at 12:58
  • Eclipse, Can you please tell me how to add it and where I can download the required fields – Charl Potgieter Aug 11 '15 at 13:04
  • Add the android-support-annotations.jar in your Project Path of the file is :- android-sdk/extras/android/support/annotations/android-support-annotations.jar – Sushil Aug 11 '15 at 13:35
  • where can I download it? and should I create that path manually? because I don't have that path. – Charl Potgieter Aug 11 '15 at 19:35
  • You have Android sdk install in you PC in that you will get this extras folder – Sushil Aug 12 '15 at 07:10
  • In my SDK manager I have installed android support repositrory and android support library both under extra but I still have the error that I mentioned top. Is it possible to provide me with the steps – Charl Potgieter Aug 12 '15 at 07:52
  • In Eclipse go to window --> Perspective --> select Android and you will get SDK path where android SDK is install in your PC go to that path and find the jar file android-sdk/extras/android/support/annotations/android-support-annotations.jar – Sushil Aug 12 '15 at 08:57