Android Support Libraries

I am new to IntelliJ. I have spent the last few of my nights learning about it.

Currently I am looking for the correct way of setting up the Android support libraries:
v4 and v7

I found this youtube video:
I do not like the way he does things, via moving folders around. It seems to me that one can just do all of this via the IntelliJ interface..

The following is the step-by-step procedure I have performed to duplicate what I found on the Android site. I would like to know if it is the most 'correct' way?

1. New Project-> Android->Library Module->Next
2. Project Name: appcompat   -> Finish
3. Right click appcompat->Open Module Settings
4. Under Project Settings select Libraries
5. + sign to add a library and select Java
6. Navigate to android-sdk/extras/android/support/v7/appcompat/libs and add android-support-v7-appcompat.jar
7. Navigate to the same directory and add android-support-v4.
8. Modules->appcompat->Dependencies both of the jars I added show up as dependencies.

Is this support library/module properly set up now?
If I wanted to use this library/module in a normal Android project, do I import what I did as a module?
or in the project settings of the Android project I want to create, do I add what I created above as a library?

So is that the correct way of creating a v4/v7 support 'module?' or library?
I think I am now confused on what intelliJ considers a library vs a module.

How would I get the support libraries auto-added to every Android application?

IntelliJ Community Edition 13.1.2
Java 1.7.0_40
Android 19
Windows 7 Pro


I asked this question a few weeks ago and got no reponse either. The current way of doing it appears to be clumsily implemented and poorly documented.
Talk about jumping through hoops:-)


Thanks for the reply.
I already uninstalled and very sadly went back to the big E.

However, I primarily use Libgdx, and they have some good documentation on setting up their library in IntelliJ.



IntelliJ considers as "Library" only JARs. Android-specific "library projects" should be configured as Modules with "Library module" setting checked in the facet settings. It is recommended to copy "appcompat" directory into your project. Therefore the structure should be like this: <your_module_using_support_library> -> <appcompat> -> <v4_jar>,<v7_jar>, where -> is "depends on". Now about the procedure, it is simplier. Let's imagine you have a project and you want to use support library in it.

1. Copy "appcompat" directory into your project
2. Create new module "appcompat" above this directory usign File | Import module | from existing sources.
3. Project Structure | Modules | appcompat | Dependencies | Add | Jars or Directories add choose v4 and v7 jars located in the "appcompat/libs" directory
4. Set "export" checkboxes for these 2 dependencies

Now you may add this "appcompat" module as the dependency to your modules and use the code and resources of the support library.


Create a model,It's file dir:/Users/allonli/Documents/workspace/android/graph/graph_sdk/src/main/java/ In path "" Should be "com/baidu/graph/sdk" Multi-level directory Rather than only one level.


Please sign in to leave a comment.