Add External Jar Library
I know that we should put the .jar library into the libs folder in the project directory and after that everything automatically should work fine. It fix errors in my code and importing classes but it throws exceptions. for example when I'm using jfeinstein10/SlidingMenu library, throws
as soon as encountering
SlidingMenu slidingMenu = new SlidingMenu();
at run time. Is there any problem with my library adding process?
https://github.com/jfeinstein10/SlidingMenu is a library project.
Import your library project sliding menu to eclipse.
Right Click on the library project. goto properties. Choose android. you should see Is Library checked.
In your Android project right click goto properties. Choose android. Click Add. browse the library project add and click ok.
Refering action bar sherlock( is also a library project) in Android project.(added snapshots). Check the link below for snap shots.
Follow the steps for sliding menu also.
In addition to Raghunandan, this is what the docs say:
You cannot export the library project to a self-contained JAR file, as you would do for a true library. Instead, you must compile the library indirectly, by referencing the library in the dependent application and building that application.
He is completely right. You cannot use the SlidingMenu as a jar file.
May be your jar file is not available at run time ,please check that first in your javabuildpathlet me clear is it a library project or its a jar.