Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Split up Eclipse project without introducing cyclic dependency errors?

I have an Android Eclipse project that I'd like to divide into two sub-projects. The problem is that both projects would need to depend on the generated Android "R" resources (R.string, etc.).

I can't figure out how I can do this (or if it's even possible) without causing a circular dependency error. What I tried to do is this:

  1. Designate one as the main "Android project," which has Android nature, contains the generated sources.
  2. The secondary project is a plan Java project, but depends on the Android project to resolve the R.string.xxx dependencies.
  3. Ideally, the main project would then depend on the secondary project to include needed code, but this causes a cyclic dependency error in Eclipse.

Is there another configuration that makes sense that would avoid the circular dependency?

like image 390
Jeff Axelrod Avatar asked Jan 27 '26 18:01

Jeff Axelrod


1 Answers

A project can have more than one source folder. Maybe that's all the separation you need?

like image 168
nitind Avatar answered Jan 29 '26 08:01

nitind