Sharing Android project between IntelliJ and Eclipse

Hi All,

I've joined a new team where everybody else uses Eclipse. I would much rather continue to use IntelliJ but I've run into a few issues.

This is all on OSX; I haven't tried it on Windows or Linux. Latest and greatest 10.5 (build 107.105)

I start with a project in Eclipse. It builds, deploys, and runs correctly. Then I create a new project in IntelliJ and Import from Eclipse. I'm keeping project and module files in a different folder (not in the Eclipse workspace folder). I'm using .ipr as the project file format and I Link created IntelliJ IDEA modules to Eclipse project files.

When IntelliJ detects the Android facet I let it create the facet and I let it create a run configuration. Here's where the first issue shows up. IntelliJ is creating its own "gen" folder in the same folder where I'm keeping the IntelliJ project and module files. This results in two gen folders and causes a build to fail because of a duplicate file. To fix this, I have to go into Project Structure->Modules->Android node and change the paths for "Manifest file", "Resources directory", "Assets directory", and "Native libs directory" to point to the corresponding locations within the Eclipse workspace tree. Then on the Compiler tab I have to change the two "Destination directory" entries to point to the corresponding locations within the Eclipse workspace tree (in this case the gen folders.) Finally I move up to the module node and remove the Content Root entry that pointed at the "gen" folder in the same folder where the project and module files are. At this point I can build the project in IntelliJ.

Meanwhile, back in Eclipse, the project is now corrupt. I have to manually edit .classpath to remove "org.eclipse.jdt.launching.JRE_CONTAINER". Now Eclipse can use the project although sometimes it takes a few cycles of closing and cleaning the Eclipse project before it's good.

However, back in IntelliJ, on the Dependencies tab in the module/Android node of Project Structure there is an entry for "" that IntelliJ does not like. It doesn't seem to affect the ability to build and deploy but if I remove it, the project is broken for Eclipse again.

Am I missing something here, has something changed, or, hopefully not, is it really not possible to share the same project between Eclipse users and IntelliJ users?


1 comment
Comment actions Permalink

Well, I wish I had found this question before I posted mine. I am having the exact same issue as your second issue with the classpath being different for IDEA and eclipse.

As for your first issue, I haven't had to change all the paths like that in my imported projects. Although, I use the .idea directory instead of the .ipr (so I can check in some of the project properties into source control, but not the things that change all the time, like IDE window layout information).

I keep my project files and source files in the same directory (though separate from the eclipse workspace directory).

So, I guess I don't really have a solution to this problem, but is there a reason that you want the project files to be location in a different directory (or did I misunderstand that part)?


Please sign in to leave a comment.