Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reference an external jar in an Android Library project in IntelliJ v10

I tried a couple of different ways but failed. Can you share what the right way is to tell intelliJ to include a jar file in the libs directory?

Thanks

like image 883
BraveNewMath Avatar asked Jan 17 '11 07:01

BraveNewMath


Video Answer


2 Answers

In the Project Structure | Modules | Dependencies add the new library and use Jar Directories type of the entry for the lib directory. Now all the jars from the lib directory will be available for the project and will be packaged automatically into the final .apk file.

like image 170
CrazyCoder Avatar answered Oct 24 '22 22:10

CrazyCoder


Unfortunately, Intellij 10.0.2 has a GUI for File/ProjectStructure/Modules/Dependencies with an internal, un-resizeable text box. Thus, buttons for the panel are off screen even if you have (imho!) a normal size computer... (Normal is always relative to oneself!) The only way to find them is to push and pull and prod the window around. Then these instructions all make perfect sense.

like image 31
AnneTheAgile Avatar answered Oct 24 '22 22:10

AnneTheAgile