Java Eclipse Android Beginner Question - How to add libraries or Linked Folder. Beginner References

我的未来我决定 提交于 2019-11-27 08:36:59

问题


I'm just starting with Android developmenent using Eclipe and have already run into some basic questions. I have some beginning books such as "busy coders guide to Android..." and "Teach Yourself Android Application Dev't in 24 Hours", however, I'm not seeing some basic things covered.

Can someone tell me how to set up a library and then use it in a project? I have some example code where they have a folder appearing in Ecliple called, "DataGatherLib" Right clicking and hitting properties reveals it is of type "Linked Folder". I suspect this is what I want. So my specific questions are: 1. How do you set up your own library project (Linked Folder if that's appropriate) in Eclipse.

  1. How then, do you use your newly created library in a Ecliple Android Project?

More generally, can someone point me to some good beginner references (books or online tutorials) that cover this. I would think that organizing your code in libaries as opposed to one big application is fairly basic, but I can't seem to find the discussion.

Thanks, Dave


回答1:


In Eclipse right-click on your project, select "Properties", then "Android" and you see a page to add a library project. BTW, you should do the same on the library project and mark it as a library first before you can add.

Alternatively you can drag and drop jars to your project and add them to your classpath, but in this case you can only access class files and not the resource files in the jar.



来源:https://stackoverflow.com/questions/5991299/java-eclipse-android-beginner-question-how-to-add-libraries-or-linked-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!