Hi,
This is a copy of a github issue posted there :
https://github.com/pfn/android-sdk-plugin/issues/29 so may be some people
from this forum may help...
-------------------------------------
Hi,
I have another issue with your plugin. This time it's about the proguard
cache.
I have added play-json to replace GSon which doesn't work well with Scala
case class.
For that purpose, I added official typesafe rep, the dependency in the sbt
file, and of course an entry in the proguardCache.
The first compilation is good, and works well.
The second compilation I always crash with that error message:
```
[error] Error Code:
[error] 1
[error] Output:
[error]
[error] UNEXPECTED TOP-LEVEL EXCEPTION:
[error] java.lang.IllegalArgumentException: already added:
Lplay/api/libs/json/JsSuccess$;
[error] at
com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
[error] at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
[error] at com.android.dx.command.dexer.Main.processClass(Main.java:685)
[error] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
[error] at com.android.dx.command.dexer.Main.access$600(Main.java:78)
[error] at
com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
[error] at
com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
[error] at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
[error] at
com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
[error] at com.android.dx.command.dexer.Main.processOne(Main.java:596)
[error] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
[error] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
[error] at com.android.dx.command.dexer.Main.run(Main.java:230)
[error] at com.android.dx.command.dexer.Main.main(Main.java:199)
[error] at com.android.dx.command.Main.main(Main.java:103)
[error] 1 error; aborting
[error] Total time: 16 s, completed 27 nov. 2013 13:37:37
[info] Set current project to OBackup (in build
file:/home/geantvert/workspace/obackup_scala/)
```
I need to clean to make it work, any idea?
Regards
My SBT file:
```
...
libraryDependencies ++= Seq (
"org.scaloid" %% "scaloid" % "latest.integration",
"com.netflix.rxjava" % "rxjava-core" % "latest.integration",
"com.netflix.rxjava" % "rxjava-scala" % "latest.integration"
intransitive(),
"com.netflix.rxjava" % "rxjava-android" % "latest.integration"
intransitive(),
"com.android.support" % "support-v4" % "19.0.0",
"com.google.code.gson" % "gson" % "latest.integration",
"org.joda" % "joda-convert" % "1.5" intransitive(),
"joda-time" % "joda-time" % "2.3",
"com.googlecode.json-simple" % "json-simple" % "1.1" intransitive(),
"de.keyboardsurfer.android.widget" % "crouton" % "latest.integration"
intransitive(),
"com.bugsense.trace" % "bugsense" % "3.5",
"com.google.android.gms" % "play-services" % "latest.integration"
intransitive(),
"com.google.apis" % "google-api-services-drive" % "latest.integration"
intransitive(),
"com.google.api-client" % "google-api-client" % "latest.integration"
intransitive(),
"com.google.api-client" % "google-api-client-android" %
"latest.integration" intransitive(),
"com.google.http-client" % "google-http-client-jackson" %
"latest.integration" intransitive(),
"com.google.http-client" % "google-http-client-gson" %
"latest.integration" intransitive(),
"com.typesafe.play" %% "play-json" % "2.2.0"
)
...
proguardCache in Android ++= Seq (
ProguardCache("org.scaloid") % "org.scaloid" %% "scaloid",
ProguardCache("rx") % "com.netflix.rxjava" %% "rxjava-core",
ProguardCache("rx") % "com.netflix.rxjava" %% "rxjava-scala",
ProguardCache("rx") % "com.netflix.rxjava" %% "rxjava-android",
ProguardCache("org.joda.time") % "joda-time" %% "joda-time",
ProguardCache("play") % "play" %% "play-json"
)
...
```
--------------------------------
Thank you for the advice you can share, it s very annoying to clean and
recompile everything from the beginning (and my computer is very slow...)
Regards
--
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/groups/opt_out.