Search code examples
javaandroidscalaproguard

Proguard warnings: can't find referenced class scala.*


After upgrading to new Android tools, I am getting following warnings from Proguard:

Warning: scala.xml.EntityRef: can't find referenced class scala.xml.EntityRef$$anonfun$text$1
Warning: scala.xml.dtd.AttrDecl$: can't find referenced class scala.xml.dtd.AttrDecl$$anonfun$toString$1
Warning: scala.collection.mutable.LinkedListLike: can't find referenced class scala.collection.mutable.LinkedListLike$$anonfun$insert$1
Warning: scala.xml.NamespaceBinding: can't find referenced class scala.xml.NamespaceBinding$$anonfun$toString$1
Warning: scala.xml.NamespaceBinding: can't find referenced class scala.xml.NamespaceBinding$$anonfun$buildString$1
Warning: scala.xml.MetaData$: can't find referenced class scala.xml.MetaData$$anonfun$toString$1
Warning: scala.xml.MetaData$: can't find referenced class scala.xml.MetaData$$anonfun$toString1$1
Warning: scala.collection.immutable.BitSet: can't find referenced class scala.collection.immutable.BitSet$$anonfun$$plus$1
Warning: scala.collection.immutable.BitSet: can't find referenced class scala.collection.immutable.BitSet$$anonfun$$minus$1
Warning: scala.collection.mutable.FlatHashTable$$anonfun$checkConsistent$1: can't find referenced class scala.collection.mutable.FlatHashTable$$anonfun$checkConsistent$1$$anonfun$apply$mcVI$sp$1
Warning: scala.collection.immutable.RedBlack: can't find referenced class scala.collection.immutable.RedBlack$Empty
Warning: scala.collection.immutable.BitSet$: can't find referenced class scala.collection.immutable.BitSet$$anonfun$$plus$1
Warning: scala.collection.immutable.BitSet$: can't find referenced class scala.collection.immutable.BitSet$$anonfun$$minus$1
Warning: scala.xml.EntityRef$: can't find referenced class scala.xml.EntityRef$$anonfun$text$1
Warning: scala.Either: can't find referenced class scala.Either$$anonfun$joinLeft$1
... (more) ...

Any hints why Proguard cannot find these classes? How can I fix this?


Solution

  • How are you building? With Ant? Sbt? Maven? And where did you get your setup from in the first place?

    Assuming that you're using Ant and the setup described at http://lamp.epfl.ch/~michelou/android/ then have you updated your build-scala.xml and proguard templates to the ones that were checked in recently to support the latest Android SDK?