2011-11-20

Using a third-party jar with Android

This guide will show you how to use a third-party jar library in your Android application. First you want to place the jar file in a specific directory in your Android workspace (I use a directory named "lib"). Next, in Eclipse, select Project from the file menu, then Properties, then Java Build Path. Next click on the Libraries tab, as seen below.


Next, click on the Add JARs... button and you will see a window like the one below. Now navigate to where you copied your jar file earlier and select it.


 Next, click on the Order and Export tab of the Java Build Path window, like in the screenshot below. You want to make sure that your newly added jar file is selected (Mine was not selected yet).



After that, you should be able to import packages and use code from your jar library.

0 comments:

Post a Comment