I have a complex app structure, main project has android libraries which have their own android libraries and jars.
Main Project
- Libs
- Android Lib project A
- Jars
- Android Lib project B
- Jars
- Android Lib project A
For clarification I have an android library project which has an ActionBarSherlock dependency and Facebook dependency, I use this library project between a few similar apps.
In the past I was able to just add the libraries as dependencies and it would build only the android related files (src/res) but now it is including everything in the path (tests, docs, example folders, websites).
I'm not sure what changed but my apks are now being stuffed with a lot of files I don't want and I'm not sure where to specify to not include them.
note: The reason why I can't just "remove" the unwanted files is because I'm cloning down the repos with submodules.
I'm using IntelliJ Idea 11.1.2 and android r20
Update: Here is a sample project of the problem I'm having: http://dl.dropbox.com/u/713581/TestDependency.zip
This happens because you keep your modules in the directory named
libs
which is by default designed for the native libraries (usually.so
files). When building the project all the files from thelibs
directory are included in the targetapk
file.To fix the problem go to the Project Structure, select Test Dependency module, open Android facet settings, change Native libs directory setting to some other path (like
libs_
instead oflibs
). Repeat the same for the TestLib module, rebuild the project. Now the finalapk
size is ~486KB and files fromlibs
folders are not included.