Android projects with Maven


I just imported a Maven based Android project into IDEA. There's a number of questions:

  • What happens with files in gen-external-apklibs? Do I check those files into version control? What about the .iml files in that directory?
  • I made some change that causes the apklibs to show up as separate modules in the project tree. How do I get rid of them again?

Bildschirmfoto 2013-06-29 um 23.10.27.png


Is it safe to assume that no one else uses Maven to build Android projects? Just curious...


Apklibs are imported as separate modules. So it is correct, that they are shown in the project tree. As about VCS storing, you may decide yourself. These files can be considered as idea project files (as .idea folder and iml files), they are generated during importing from Maven. If you store such files under VCS, you need to store gen-apklib folder too. Otherwise the project cannot be opened correctly after checkout. But if you store only Maven-specific files under version control and, the developers using IntelliJ perform "Import from Maven" on their local machines, then you don't need to commit these files.


Thank you for the explanation.


Please sign in to leave a comment.