I think this is a bug in android-sdk-plugin.

If I remove my icons in drawable-hdpi, then it complains about the icons 
in drawable-mdpi.
Maybe because I'm not following the Gradle file layout?
Because res/drawable-*dpi is standard Android.

Am Dienstag, 3. Juni 2014 12:03:30 UTC+2 schrieb David Pérez:
>
> Hi,
>
> I'll be trying to migrate all my Android projects to SBT.
> If it fails, then I'll try Gradle or Maven.
>
> SBT is quite expressive.
>
> *Problem #1:*
>
> In a pure Java project, the following happens when doing 
> android:packageDebug:
>
> com.android.builder.packaging.DuplicateFileException: Duplicate files 
> copied in APK res/drawable-hdpi/ic_menu_send.png
>         File 1: /home/david/des/android/FotoCaptura/bin/resources-debug.ap_
>         File 2: /home/david/des/android/FotoCaptura/bin/resources-debug.ap_
>
>         at 
> com.android.builder.internal.packaging.Packager$JavaAndNativeResourceFilter.checkEntry(Packager.java:145)
>         at 
> com.android.builder.signing.SignedJarBuilder.writeZip(SignedJarBuilder.java:258)
>         at 
> com.android.builder.internal.packaging.Packager.addResourcesFromJar(Packager.java:404)
>         at 
> com.android.builder.AndroidBuilder.packageApk(AndroidBuilder.java:1198)
>
>
> in:
>
>    - res/drawable-ldpi/
>    - res/drawable-mdpi/
>    - res/drawable-hdpi/
>    - res/drawable-xhdpi/
>
> I have this png: ic_menu_send.png.
>
> This is an excerpt of my Build.scala:
>
> val trazado = Seq(
> "com.github.tony19"             % "logback-android-core"    % "1.1.1-2",
> "com.github.tony19"             % "logback-android-classic" % "1.1.1-2",
> "org.slf4j"                     % "slf4j-api"               % "1.7.6"
> )
>
> lazy val FotoCaptura = project.settings(
>     configApl ++ Seq(
>     libraryDependencies ++= Seq(
>     mime
> ),
>     dexCoreLibrary in Android := true
> ): _*
> ).dependsOn(Bibl)
>
> lazy val Bibl = project.settings(
>     libraryDependencies ++= trazado
> )
>
> lazy val configApl = android.Plugin.androidBuild ++ Seq(
> useProguard in Android := true,
> proguardOptions in Android += proguardEstandar,
> run <<= run in Android,
> install <<= install in Android,
> platformTarget in Android := "android-17",
> javacOptions ++= Seq("-source", "1.7", "-target", "1.7"),
> javacOptions in Compile <<= (javacOptions in Compile) map { _ collect {
> case "1.5" => "1.7"
> case s     => s
> }
> },
> managedClasspath in Test <++= (platformJars in Android, baseDirectory) map 
> {
> case ((j,_), b) =>
> Seq(Attributed.blank(b / "bin" / "classes"), Attributed.blank(file(j)))
> },
> useProguard in Android := true,
> // Da problemas engordar .apk con librerias test
> debugIncludesTests in Android := false,
> libraryDependencies ++= Seq(
> "org.scala-lang" % "scala-reflect" % "2.10.4"
> ),
> dexMaxHeap in Android := "8192m",
>     libraryDependencies ++= Seq(
> "ch.acra" % "acra" % "4.5.0"
> )
> )
>
> The problem happens with FotoCaptura app.
>

-- 
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