I have an external jar that I can use in my Android application, I just reference it as an external jar from my application. Is there any benefit开发者_高级运维 in creating an Android library project with this external jar for Android applications to use, or is this pretty much the same as referencing the external jar?
Making a library project makes sense only in one case: if you want to share some application resources across all the apps (for example layouts, drawables, strings etc). If you just need some common java code there is no any difference between external jar and library project.
You are probably better off using the jar as it is in your android project. The android library project makes sense only when you are developing common code from scratch. That way instead of making a jar first and then including it in a project, you can create an android library project and then refer it in other projects.
Other than that I can't seem to find real good reasons for it.
Anybody, can you think of any?
精彩评论