I am beginner in android. My client gives me a sample project as reference. In that project have an extra folder 'android dependency’ and that contain a jar file 'annotation.jar' .How can I add the very same jar to my project dependency folder? Any one please helps me!
-
add the jar to the libs folder under your project. – Raghunandan May 10 '13 at 05:36
-
add the jar file inside the lib folder. If there is nay dependency xml file then put inside the project folder. – Sunil Kumar May 10 '13 at 05:37
-
@sunil your answer is incorrect, its libs,not lib – Siddharth May 10 '13 at 05:38
-
@siddharth you right it is a mistake only. – Sunil Kumar May 10 '13 at 05:39
3 Answers
Find "libs" directory in your project. Those will contain physically those jar files. Android Dependency will indicate that how many libraries are associated with current project.
When you find "libs" directory, right click on jar files, and you will find "Build Path" and then add them to build path. will solve your problem.
Edit
Go to the SDK Manager within eclipse (Window --> Android SDK Manager) and installed the Android Support Package which is found in the Extras folder.

- 25,864
- 13
- 83
- 93
-
But actualy this library is from "D:\adt-bundle-windows-x86\sdk\tools\support\ annotations.jar" – Arun J May 10 '13 at 06:01
-
it will automatically added, you don't need to add that library. Its android API supported library. Do you get any error message regarding not having that library in your application? – Chintan Rathod May 10 '13 at 06:13
-
I create two app that are exactly same.But one of them canot have the dependency folder and also it is not working properly. – Arun J May 10 '13 at 06:58
-
@ArunJNair, my pleasure. please up vote and accept if helpful so other may get benefit from this.. :) – Chintan Rathod May 13 '13 at 17:23
Follow this: Project->RightClick->Properties->BuildPath and Add External jar then browse for particular jar file and Add.

- 6,177
- 6
- 30
- 40
Just copy it in your libs folder and refresh your project. Remember it should be libs
not lib
. Also remove it from your "external jars" path from Project->RightClick->Properties->BuildPath
Edit :
And also try this
Also remove android.jar file to your build path.
-
But actualy this library is from "D:\adt-bundle-windows-x86\sdk\tools\support\ annotations.jar" – Arun J May 10 '13 at 05:54
-
then you need to add "external jar in your build properties". That will add a class path to your .classpath file. – Siddharth May 10 '13 at 05:56
-
it show these error in console [2013-05-10 11:56:43 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/annotation/SuppressLint; [2013-05-10 11:56:43 - paycycle] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/annotation/SuppressLint; – Arun J May 10 '13 at 06:27