I'm using intellij idea. As you may know, importing slidingmenu lib into your brand new project is painfully while you're running on eclipse. I did it once but I am using intellij idea anymore and I wonder that is there anybody know how to import and run it succesfully while using Intellij? It is very important to me.
Asked
Active
Viewed 5,194 times
3
-
1Import `library` folder as a module in IDEA, make sure it has **Library Module** option enabled in the Android facet, then [add this module to the dependencies](http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html) of your main application. Jars in the `library` module need to have **Export** option enabled in the dependencies configuration. – CrazyCoder Feb 25 '13 at 05:02
-
but it's not just importing a library issue. I know how to import any library project. I'm having trouble importing "slidingmenu" lib. There are no any tutorial related to how to import it. – Mustafa Güven Feb 25 '13 at 07:33
-
1I've prepared the sample project using `example` from the `SlidingMenu` and `ActionBarSherlock`. You can [grab it here](https://dl.dropbox.com/u/2752840/SlidingMenu.zip) for investigation. Open `SlidingMenu/example` project in IDEA and configure **Android 4.1.2 Google APIs** SDK. Build, run in the emulator to test. The trick was to set the dependencies properly and to change `*Activity` to `Sherlock*Activity` in several library classes. – CrazyCoder Feb 25 '13 at 09:09
-
I dont know how much I need to thank you. You sir, you are really lifesaver! Thank you 1000 times! It works like a charm. – Mustafa Güven Feb 25 '13 at 12:27
2 Answers
11
I've prepared the sample project using example
from the SlidingMenu
and ActionBarSherlock
. You can grab it here for investigation. Open SlidingMenu/example
project in IDEA and configure Android 4.1.2 Google APIs SDK. Build, run in the emulator to test. The trick was to set the dependencies properly and to change *Activity
to Sherlock*Activity
in several library classes (per instructions on the SlidingMenu project page).
Dependencies are set as follows:
example (main app)
library (SlidingMenu)
abs (ActionBarSherlock) (make sure Export is enabled)
android-support-v4.jar (make sure Export is enabled)
junit (for ActionBarSherlock tests)

CrazyCoder
- 389,263
- 172
- 990
- 904
-
Error : `java: C:\and\slidemenu_2_2\SlidingMenu\library\src\com\slidingmenu\lib\app\SlidingMapActivity.java:7: package com.google.android.maps does not exist` – Pejman Nov 25 '13 at 11:59
2
I just want to add my solution if someone doesn't want to use CrazyCoder code. This solution's using IntelliJ on Mac OS X. Here's the steps for noob:
- Go to File > Import Module. Select the root directory of your downloaded unzipped SlidingMenu
- After importing module, go to File > Project Structure. Select 'Modules' under 'Project Settings', and then select your project name. Select Dependencies tab and click '+' sign and choose 'Module Dependency' and pick SlidingMenu module.
- If your project name's module has android-support-v4.jar's dependency, remove that since SlidingMenu has that dependency already
- Select SlidingMenu module and enable export for android-support-v44 (android-support-v4.jar)

Alphapico
- 2,893
- 2
- 30
- 29