Adding android.support.v4 to your Android application in IntelliJ IDEA

You can enable support for certain forward version features via the android.support namespace. In order to accomplish this you need to start the Android SDK Manager and make sure that under the Extras heading you select and install the Android Support package.

Once done you go into the directory extras/android/support/v4 and copy the android-support-v4.jar to your own project’s libs directory. Next go within IntelliJ IDEA to File ยป Project Structure and under Project Settings go to Modules, make sure your application is selected in the middle pane, then on the right side select the Dependencies tab. In the window below click the plus-icon and select Jars or directories. From the resulting window browse to your libs directory and select the android-support-v4.jar and press OK to close the window and add the jar-file to the dependencies of the project. Since you are now using certain constants from a newer version of Android the Module SDK needs to be changed to Android 4.0.3 Platform as well. Press Apply and close the Project Settings by pressing the OK button.

9 thoughts on “Adding android.support.v4 to your Android application in IntelliJ IDEA

  1. hey i’m also hvng the same prob…n still not solved.. its still showing Android Support Jar not found:] D:\eclipse helios\eclipse\v4\android-support-v4.jar. what to do???plss help..i’m stuck with this prob from last two days :((((

  2. Thanks for your hint. It’s working, but the downside is that not every feature of 4.0.3 is backported via the support libraries. And adjusting Intellij to API of 4.0.3 means we now have to be very careful which functionality we are using. Maybe it’s not present in the lower API.

  3. Saviour! Thanks so much A++ (Handy if you are for some reason using the Big Nerd Ranch text books with Intelli-j instead of Eclipse (like I am)).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>