I'm trying to use the scala-reflect package for android development. I have added the scala-reflect dependency in my build.sbt:
libraryDependencies += "org.scala-lang" % "scala-reflect" % "2.11.8"
but I get an exception:
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/rmi/Remote;
at scala.reflect.internal.Definitions$DefinitionsClass.RemoteInterfaceClass$lzycompute(Definitions.scala:370)
at scala.reflect.internal.Definitions$DefinitionsClass.RemoteInterfaceClass(Definitions.scala:370)
at scala.reflect.runtime.JavaUniverseForce$class.force(JavaUniverseForce.scala:255)
at scala.reflect.runtime.JavaUniverse.force(JavaUniverse.scala:16)
at scala.reflect.runtime.JavaUniverse.init(JavaUniverse.scala:147)
at scala.reflect.runtime.JavaUniverse.<init>(JavaUniverse.scala:78)
at scala.reflect.runtime.package$.universe$lzycompute(package.scala:17)
at scala.reflect.runtime.package$.universe(package.scala:17)
I have tried to add the java source of java.rmi.Remote
and java.rmi.RemoteException
and built the project with android:package --core-library
(because sbt has not found the dexCoreLibrary option) , it builded successfully, but I got the runtime error.
So, is it possible to add the java.rmi dependency otherwise, that scala.reflect can use it?
Aucun commentaire:
Enregistrer un commentaire