Thanks pfn for your unvaluable assistance.

I haven't modified much my previous Build.scala:

object Build extends android.AutoBuild {
   lazy val raiz = (project in file(".")).settings(
      android.Plugin.androidCommands: _*
   )

   lazy val IncidenciasS = project.settings(
       configScala ++ Seq(
         transitiveAndroidLibs in Android := false,
         //resolvers += Resolver.url("http://jcenter.bintray.com";),
         libraryDependencies ++= Seq(
            scaloid
            //"com.google.android"        % "multidex"                % "0.1",
            //"com.novocode"            % "junit-interface"       % "0.9"    % 
"test",
            //"junit"                 % "junit"              % "4.11"   % 
"test",
            //"org.scalatest"        %% "scalatest"              % "2.1.4"  % 
"test",
            //"org.robolectric"          % "robolectric"          % "2.3"    % 
"test"
         )
      ): _*
   ).dependsOn(BiblS)

   lazy val BiblS = project.settings(
      android.Plugin.androidBuildApklib ++ configLib ++ Seq(
         scalaVersion := "2.10.4",
         libraryDependencies ++= Seq(
            scaloid,
            support
         )
      ): _*
   )

   val scaloid = "org.scaloid"             %% "scaloid"            % "3.2.1-8"
   val support = "com.android.support" % "appcompat-v7" % "19.1.0"

   //=============================Configuraciones

   lazy val configComun = Seq(
      platformTarget in Android := "android-17",
      sourcesInBase := false
   )

   lazy val configLib = configComun ++ Seq(
      exportJars := true
   )

   lazy val configApl = configComun ++ Seq(
      useProguard in Android := true,
      proguardOptions in Android += proguardEstandar,
       packageDebug <<= packageDebug in Android,
      run <<= run in Android,
      install <<= install in Android,
      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)))
      },
      debugIncludesTests in Android := false,
      dexMaxHeap in Android := "8192m",
       // Librerias usadas en todos los proyectos
       libraryDependencies ++= Seq(
         "ch.acra" % "acra" % "4.5.0"
      )
   )

   lazy val configScala = android.Plugin.androidBuild(BiblS) ++ configApl ++ 
Seq(
      proguardOptions in Android += proguardScala,
      scalaVersion := "2.10.4",
      scalacOptions in Compile += "-feature",
      scalacOptions in (Compile, compile) ++= Seq(
         "-target:jvm-1.7"
      ),
      proguardCache in Android ++= Seq(
         ProguardCache("org.scaloid") % "org.scaloid"
      ),
       libraryDependencies ++= Seq(
         "org.scala-lang"         % "scala-library"        % scalaVersion.value
      )
   )

   val proguardEstandar =
      """
        |-dontpreverify
        |-dontoptimize
        |-dontobfuscate
        |-flattenpackagehierarchy
        |-dontusemixedcaseclassnames
        |-dontskipnonpubliclibraryclasses
        |-verbose
        |
        |# Evitar avisos de clases no existentes desde ch.qos.logback.core
        |-dontwarn javax.mail.**
        |-dontwarn javax.naming.Context
        |-dontwarn javax.naming.InitialContext
        |-dontwarn android.app.Application**
        |-dontwarn java.lang.String
        |-dontskipnonpubliclibraryclasses
        |
        |-keep public class * extends android.app.Activity
        |-keep public class * extends android.app.Application
        |-keep public class * extends android.app.Service
        |-keep public class * extends android.content.BroadcastReceiver
        |-keep public class * extends android.content.ContentProvider
        |-keep public class * extends android.app.backup.BackupAgentHelper
        |-keep public class * extends android.preference.Preference
        |-keep public class * extends android.view.View
        |-keep public class com.android.vending.licensing.ILicensingService
        |
        |-keep public class * extends android.app.Fragment
        |-keep public class * extends android.support.v4.app.Fragment
        |
        |-keepclasseswithmembernames class * {
        |    native <methods>;
        |}
        |
        |-keepclasseswithmembers class * {
        |    public <init>(android.content.Context, android.util.AttributeSet);
        |}
        |
        |-keepclasseswithmembers class * {
        |    public <init>(android.content.Context, android.util.AttributeSet, 
int);
        |}
        |
        |-keepclassmembers enum * {
        |    public static **[] values();
        |    public static ** valueOf(java.lang.String);
        |}
        |
        |# As described in tools/proguard/examples/android.pro - ignore all 
warnings.
        |-dontwarn android.support.v4.**
        |
        |# The maps library uses custom Parcelables.  Use this rule (which is 
slightly
        |# broader than the standard recommended one) to avoid obfuscating them.
        |-keepclassmembers class * implements android.os.Parcelable {
        |    static *** CREATOR;
        |}
        |
        |# Missing annotations are harmless.
        |-dontwarn sun.misc.Unsafe
        |-dontwarn javax.annotation.**
        |
        |######## Opciones para ACRA:
        |# we need line numbers in our stack traces otherwise they are pretty 
useless
        |-renamesourcefileattribute SourceFile
        |-keepattributes SourceFile,LineNumberTable
        |
        |# ACRA needs "annotations" so add this...
        |-keepattributes *Annotation*
        |
        |-keep class org.acra.ReportingInteractionMode {
        |    *;
        |}
        |
        |-keepnames class org.acra.sender.HttpSender$** {
        |    *;
        |}
        |
        |-keepnames class org.acra.ReportField {
        |    *;
        |}
        |
        |# keep this otherwise it is removed by ProGuard
        |-keep public class org.acra.ErrorReporter
        |{
        |    public void addCustomData(java.lang.String,java.lang.String);
        |    public void putCustomData(java.lang.String,java.lang.String);
        |    public void removeCustomData(java.lang.String);
        |}
        |
        |# keep this otherwise it is removed by ProGuard
        |-keep public class org.acra.ErrorReporter
        |{
        |    public void handleSilentException(java.lang.Throwable);
        |}
        |
        |# Si esto no se hace peta en nuevo movil de Ramon
        |-keep class 
org.acra.jraf.android.util.activitylifecyclecallbackscompat.ActivityLifecycleCallbacksWrapper
 {
        |    *;
        |}
      """.stripMargin

   val proguardMapas =
      """
        |# We restrict a few more optimizations for the maps library.
        |-optimizations 
!code/simplification/arithmetic,!field/*,!class/merging/*,!code/simplification/variable
        |
        |# The maps library uses serialization so keep this.
        |-keepclassmembers class * implements java.io.Serializable {
        |    static final long serialVersionUID;
        |    static final java.io.ObjectStreamField[] serialPersistentFields;
        |    private void writeObject(java.io.ObjectOutputStream);
        |    private void readObject(java.io.ObjectInputStream);
        |    java.lang.Object writeReplace();
        |    java.lang.Object readResolve();
        |}
        |
        |# The maps library uses custom Parcelables.  Use this rule (which is 
slightly
        |# broader than the standard recommended one) to avoid obfuscating them.
        |-keepclassmembers class * implements android.os.Parcelable {
        |    static *** CREATOR;
        |}
        |
        |# 
https://groups.google.com/d/topic/guava-discuss/YCZzeCiIVoI/discussion
        |-dontwarn com.google.common.collect.MinMaxPriorityQueue
        |
        |-dontnote javax.xml.**
        |-dontnote org.w3c.dom.**
        |-dontnote org.xml.sax.**
        |
        |# Additional ones needed for Maps API library.
        |-keep public class 
com.google.googlenav.capabilities.CapabilitiesController*
        |
        |# Ignore invalid constant ref.  See
        |# 
https://groups.google.com/d/topic/guava-discuss/YCZzeCiIVoI/discussion
        |-dontwarn com.google.common.collect.MinMaxPriorityQueue
      """.stripMargin

   val proguardScala =
      """
        |-dontwarn scala.**
        |-dontnote scala.Enumeration
        |
        |# workaround for https://issues.scala-lang.org/browse/SI-5397
        |-keep class scala.collection.SeqLike {
        |    public protected *;
        |}
        |-keep public class scala.Option
        |-keep public class scala.Function0
        |-keep public class scala.Function1
        |-keep public class scala.Function2
        |-keep public class scala.Product
        |-keep public class scala.Tuple2
        |
        |-keep public class scala.collection.Seq
        |-keep public class scala.collection.immutable.List
        |-keep public class scala.collection.immutable.Map
        |-keep public class scala.collection.immutable.Seq
        |-keep public class scala.collection.immutable.Set
        |-keep public class scala.collection.immutable.Vector
      """.stripMargin
}


Am Dienstag, 9. September 2014 16:59:30 UTC+2 schrieb pfn:
>
> You've done something to include resources-debug.ap_ into your classpath, 
> which is incorrect. resources-debug.ap_ is used in packaging as the 
> resources argument, if it's passed as a classpath parameter, it will cause 
> the error you see.
>
>

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