views:

147

answers:

2

My project layout is

/ServerModule
  /commonClasses

/AndroidClient
  /needsToIncludeSomeCommonClasses

but as soon as i want to compile and build my AndroidClient IntelliJ adds the server libs to the compile classpath of my android project and I get a UNEXPECTED TOP-LEVEL EXCEPTION because of multiple classes that are present in android and normal java.

My question is how can i set up my project without duplicating the server code?

It seems to be a problem with the android-plugin. It includes all the serverside libs in the build.

A: 

I would ask IntelliJ support, http://www.jetbrains.com/support/idea/index.html they are usually very responsive or ask their Community Support Forum. http://www.jetbrains.com/devnet/

Peter Lawrey
I sent them a sample project.
gabe
A: 

I found a solution.

I need to make a new module with common classes only and link this with the other two modules. Not very pretty but it works

gabe
In fact the longer i work like this, it seems actually quite pretty ;-)
gabe