[英]Proguard warnings: can't find referenced class scala.*
After upgrading to new Android tools, I am getting following warnings from Proguard: 升级到新的Android工具后,我收到了来自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? 有没有提示为什么Proguard找不到这些课程? How can I fix this?
我怎样才能解决这个问题?
If you look at the internals of the listed classes from scala-library.jar (version 2.9.1), you'll see that they reference classes that don't exist at all. 如果从scala-library.jar(版本2.9.1)查看列出的类的内部,您将看到它们引用了根本不存在的类。 It looks like a compiler problem to me.
对我来说,它看起来像编译器问题。 The references are not fundamental for processing and running the code though, so you can let ProGuard accept the jar with this option:
引用不是处理和运行代码的基础,因此您可以让ProGuard接受带有此选项的jar:
-dontwarn scala.**
How are you building? 你是怎么建的? With Ant?
用Ant? Sbt?
SBT? Maven?
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? 假设您正在使用Ant和http://lamp.epfl.ch/~michelou/android/中描述的设置,那么您是否已将build-scala.xml和proguard模板更新为最近检查过的那些以支持最新的Android SDK?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.