Just a quick reminder to myself–I’ve done this several times, but since it’s not as explicitly obvious as doing it with the Eclipse Android plug-in, I always end up looking up for the info somewhere else, and it’s not as complete and understandable as my own notes could be!
So here we go:
- Right click over the project name and select Module Settings in the pop up menu.
- In Project settings select the “Modules” section
- Add a new module by clicking [+]
- Select “Import existing module”
- Browse to the path containing your library and its .iml file (IntelliJ project source file)
- Click Finish. The library project is added as a module.
- In the modules list click over your project to select it.
- On the right hand side select the “Dependencies” tab.
- Click Add…
- Choose “Module dependency…”
- A list should appear with the name of the module/library you previously added to the project. Select it and press OK.
- It will be added to the list of dependencies of your project.
- Press OK to finish configuring the project.
- You can now use the resources and classes from the library project in your project!