1

I am trying to create an Android application with Java and Eclipse. Previously I have written code with Visual Studio and now i want to do it with Eclipse.

I have a project and I want to add a reference to some another library to it. How can I do it? In Visual Studio i could click the right mouse button, select "Add Reference" item in context menu and find wanted library in standard .NET assemblies or any other. But I don't know how I can do it in Eclipse.

In other words i need an analogue of "Add Reference" from Visual Studio

xmojmr
  • 8,073
  • 5
  • 31
  • 54
Junior222
  • 803
  • 3
  • 12
  • 22
  • 1
    If its a dynamic web project then just go to properties of your project. Select Deployment Assembly -> add -> Java Build Path Entries. – Imran Oct 11 '14 at 10:45
  • Unfortunatelly but i have not this option (Deployment Assembly). I have an android client application and the project containing a business logic. And i want to use from second one class **android.util.JsonReader**. Obviously i should add reference to **android.util** library (or package). but i don't know how to do it – Junior222 Oct 11 '14 at 10:52
  • check this one: http://stackoverflow.com/questions/9283040/eclipse-android-project-how-to-reference-library-within-workspace – Imran Oct 11 '14 at 10:58
  • Use this link for reference: http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html – Imran Oct 13 '14 at 07:55

1 Answers1

1

Adding a resource in Eclipse is called adding a library.
What you do is:
1. Right Click on your project
2. Click Properties
3. Click Java Build Path
4. Click Add External Jars (Make sure you are in the Libraries Tab)
5. Find your file in your computer
6. Click Ok, then Ok again
7. You're done!

I hope this helps