I have a libgdx android project in eclipse which I've added scala and AndroidProguardScala natures to. This was working great, but suddenly eclipse has started giving me the warning "More than one Scala library found on the build path". I can still build and install the project on a device, but it exits immediately with NoClassDefFoundError: scala.Tuple2$mcZZ$sp
, so it looks like the Scala library isn't being included at all.
My project seems to have the Scala library both under "Scala Library [2.10.1]" (as "scala-library.jar") and under "Android Dependencies" (as "scala_library.min.jar") so I guess that the Proguard output is conflicting with the original library, but I have no idea why this has happened or how to fix it.
At this point I could just make a new project and copy the source files over, but it would be great if anyone could shed some light on this.
Edit: After some experimentation it turns out that this code (from within a method of a trait) seems to be causing the problem.
acckeys match {
case (true, false) => acceleration.set(0, accel).rotate(rotation)
case (false, true) => acceleration.set(0, -accel).rotate(rotation)
case _ => acceleration.set(0, 0)
}
(where acckeys is a function returning a tuple
and acceleration
is a vector)
The multiple libraries warning is still there, so I guess that isn't related to to the problem. Luckily, I don't actually need to reference this code from the android version of the project, but it would still be useful to know why this code compiles but fails to run.