I'm pretty new to the whole Android/Scala thing and I am trying to create a 
simple android app using macroid and sbt. I started with this start 
project: https://github.com/macroid/macroid-starter

I updated project/plugins.sbt to a newer android-sdk-plugin: 
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.2")



It compiles and runs fine, but then I tried to add dependencies so I can 
use paho's mqtt libraries:

resolvers ++= Seq(
  Resolver.sonatypeRepo("releases"),
  "jcenter" at "http://jcenter.bintray.com";,
  "phao" at "https://repo.eclipse.org/content/repositories/paho-releases/";
)


libraryDependencies ++= Seq(
  aar("org.macroid" %% "macroid" % "2.0.0-M4"),
  aar("org.macroid" %% "macroid-viewable" % "2.0.0-M4"),
  aar("com.android.support" % "support-v4" % "21.0.3"),
  "org.eclipse.paho" % "org.eclipse.paho.client.mqttv3" % "1.0.2",
  "org.eclipse.paho" % "org.eclipse.paho.android.service" % "1.0.2",
  compilerPlugin("org.brianmckenna" %% "wartremover" % "0.10")
)




Adding the android.service library causes the sbt 'run' command to fail 
with:

[error] (android:proguard) java.io.IOException: Can't write 
[/code/android/pirage-app/target/android/intermediates/proguard/classes.proguard.jar]
 
(Can't read 
[/code/android/pirage-app/target/android/intermediates/aars/com.android.support-support-v4-21.0.3/libs/internal_impl-21.0.3.jar(;;;;;;!META-INF/**,!rootdoc.txt)]
 
(Duplicate zip entry 
[internal_impl-21.0.3.jar:android/support/v4/view/MotionEventCompatEclair.class]))

I saw another post about this error when adding your own library that was 
fixed with build options, but what can I do about it when I'm using a 
dependency packaged by someone else?

-- 
You received this message because you are subscribed to the Google Groups 
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to