Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SlidingMenu library installation

I am trying to follow this tutorial.

The aim is to integrate the SlidingMenu android library. As per the instructions in the tutorial:

For non-maven project : Copy library/target/slidingmenu-1.3-SNAPSHOT.jar into the libs directory of your project.

I don't know how to use Maven and I don't want to introduce another layer of complexity.

So, where can I locate the library/target/slidingmenu-1.3-SNAPSHOT.jar file?

Update

With the exception of the Maven section, I followed the tutorial completely but got the following single error:

slidingmenu cannot be resolved or is not a field

The error is caused by this line of code:

slidingMenu.setMenu(R.layout.slidingmenu);

I'm a beginner but I know that's an issue of a missing resource. What I don't know is if it's related to the Maven issue. How can I fix it?

like image 209
sisko Avatar asked Aug 14 '13 15:08

sisko


1 Answers

So without implementing maven, all you need to do is download that library from your link on github (here). It is only 4.4 MB.

On that github page, there should be a button that says "Download ZIP".

Once you save the zip file, open the zip file, and navigate the contents... inside the library folder, you can find the source files of the SlidingMenu solution.

The QUICKEST way to get this into your project is to copy the contents of the libs, res, and src folders into the respective folders in your project.

The SlidingMenu project on github cannot merely be a .jar file, since it contains visual assets as well (ie. items in the /res folder are needed).

Another approach is to create a separate project on your computer named SlidingMenu (create it as a "library" project) and then include this project into your own project as a dependency. The manner in which to do this varies by IDE (Eclipse, IntelliJ, AndroidStudio, etc). Hopefully you're using one of those IDEs.

like image 122
MiStr Avatar answered Nov 16 '22 03:11

MiStr