Proguard 警告:找不到引用的类 scala.*

发布于 2024-12-14 02:58:01 字数 1874 浏览 0 评论 0原文

升级到新的 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) ...

任何提示为什么 Proguard 找不到这些类?我该如何解决这个问题?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘿哥们儿 2024-12-21 02:58:01

如果您查看 scala-library.jar(版本 2.9.1)中列出的类的内部结构,您会发现它们引用了根本不存在的类。对我来说这看起来像是编译器问题。不过,这些引用对于处理和运行代码来说并不是基础,因此您可以使用此选项让 ProGuard 接受 jar:

-dontwarn scala.**

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

-dontwarn scala.**
月寒剑心 2024-12-21 02:58:01

你建设得怎么样?与蚂蚁? SB?马文?您最初是从哪里获得设置的?

假设您正在使用 Ant 以及 http://lamp.epfl.ch/~ 中描述的设置michelou/android/ 那么您是否已将 build-scala.xml 和 proguard 模板更新为最近签入的模板以支持最新的 Android SDK?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文