Now, able to reproduce the problem, even after a clean.

> show compile:dependencyClasspath
[info] 
List(Attributed(/home/david/des/android/Incidencias/target/aars/com.google.android.gms-play-services-5.2.08/com.google.android.gms-play-services-5.2.08.jar),
 
Attributed(/home/david/des/android/Incidencias/target/aars/com.google.maps.android-android-maps-utils-0.3.1/com.google.maps.android-android-maps-utils-0.3.1.jar),
 
Attributed(/home/david/des/android/BiblS/target/android-bin/classes.jar), 
Attributed(/home/david/des/android/Incidencias/target/android-bin/classes), 
Attributed(/home/david/des/android/Incidencias/target/android-bin/classes), 
Attributed(/home/david/des/android/Incidencias/target/android-bin/classes), 
Attributed(/home/david/.sbt/boot/scala-2.10.4/lib/scala-library.jar), 
Attributed(/home/david/.ivy2/cache/ch.acra/acra/jars/acra-4.5.0.jar), 
Attributed(/home/david/.ivy2/cache/org.json/json/jars/json-20080701.jar), 
Attributed(/home/david/.ivy2/cache/org.apache.httpcomponents/httpmime/jars/httpmime-4.1.1.jar),
 
Attributed(/home/david/.ivy2/cache/org.scaloid/scaloid_2.10/jars/scaloid_2.10-3.2.1-8.jar),
 
Attributed(/home/david/des/android-sdks/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar))


> show compile:unmanagedJars
[info] 
ArrayBuffer(Attributed(/home/david/des/android/Incidencias/target/aars/com.google.android.gms-play-services-5.2.08/com.google.android.gms-play-services-5.2.08.jar),
 
Attributed(/home/david/des/android/Incidencias/target/aars/com.google.maps.android-android-maps-utils-0.3.1/com.google.maps.android-android-maps-utils-0.3.1.jar),
 
Attributed(/home/david/des/android/BiblS/target/android-bin/classes.jar), 
Attributed(/home/david/des/android/Incidencias/target/aars/com.google.android.gms-play-services-5.2.08/com.google.android.gms-play-services-5.2.08.jar),
 
Attributed(/home/david/des/android/Incidencias/target/aars/com.google.maps.android-android-maps-utils-0.3.1/com.google.maps.android-android-maps-utils-0.3.1.jar),
 
Attributed(/home/david/des/android/BiblS/target/android-bin/classes.jar), 
Attributed(/home/david/des/android/Incidencias/target/aars/com.google.android.gms-play-services-5.2.08/com.google.android.gms-play-services-5.2.08.jar),
 
Attributed(/home/david/des/android/Incidencias/target/aars/com.google.maps.android-android-maps-utils-0.3.1/com.google.maps.android-android-maps-utils-0.3.1.jar),
 
Attributed(/home/david/des/android/BiblS/target/android-bin/classes.jar))

> show compile:managedClasspath
[info] 
List(Attributed(/home/david/.sbt/boot/scala-2.10.4/lib/scala-library.jar), 
Attributed(/home/david/.ivy2/cache/ch.acra/acra/jars/acra-4.5.0.jar), 
Attributed(/home/david/.ivy2/cache/org.json/json/jars/json-20080701.jar), 
Attributed(/home/david/.ivy2/cache/org.apache.httpcomponents/httpmime/jars/httpmime-4.1.1.jar),
 
Attributed(/home/david/.ivy2/cache/org.scaloid/scaloid_2.10/jars/scaloid_2.10-3.2.1-8.jar),
 
Attributed(/home/david/des/android-sdks/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar))


Project setup:

import android.Keys._
import sbt._
import sbt.Keys._

/**Reglas para construir todos nuestros proyectos Android.*/
object Build extends android.AutoBuild {
//=============================Proyectos

lazy val raiz = (project in file(".")).settings(
android.Plugin.androidCommands: _*
)

/** Aplicacion de Incidencias vieja.*/
lazy val Incidencias = project.settings(
configScala ++ Seq(
//transitiveAndroidLibs in Android := false,
//enforceUniquePackageName in Android := false
libraryDependencies ++= Seq(
mime,
scaloid,
//support,
"com.google.android.gms" % "play-services" % "5.2.08",
"com.google.maps.android" % "android-maps-utils" % "0.3+",
"ch.acra" % "acra" % "4.5.0"
)
): _*
)

val scaloid = "org.scaloid" %% "scaloid" % "3.2.1-8"
val mime = "org.apache.httpcomponents" % "httpmime" % "4.1.1" intransitive()
val support = "com.android.support" % "appcompat-v7" % "19.1.0"

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

/** Configuracion comun a aplicaciones y librerias.*/
lazy val configComun = Seq(
platformTarget in Android := "android-19",
sourcesInBase := false
)

/** Configuracion comun a todas las librerias.*/
lazy val configLib = configComun ++ Seq(
exportJars := true
)

/** Configuracion comun a todas las aplicaciones.*/
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
}
},
    // Al compilar tests, añadir el classpath normal
managedClasspath in Test <++= (platformJars in Android, baseDirectory) map {
case ((j,_), b) =>
Seq(Attributed.blank(b / "bin" / "classes"), Attributed.blank(file(j)))
},
// Da problemas engordar .apk con librerias test
debugIncludesTests in Android := false,
dexMaxHeap in Android := "8192m",
    // Librerias usadas en todos los proyectos
    libraryDependencies ++= Seq(
"ch.acra" % "acra" % "4.5.0"
)
)

/**Configuracion comun a todas las aplicaciones Scala.*/
lazy val configScala = android.Plugin.androidBuild(BiblS) ++ configApl ++ 
Seq(
//apkbuildExcludes in Android := true,
//debugIncludesTests in Android := false,
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
  |
  |#Sirve para depurar
  |-keep public class es.fcc.bibl.xml.package$Documento
""".stripMargin
}


Am Montag, 15. September 2014 15:28:52 UTC+2 schrieb pfn:
>
> Need to see what these look like when you're encountering the problem. In 
> a normal state they look fine
>
>>
>> 

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