简体   繁体   English

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

[英]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.

相关问题 在Proguard的类中找不到引用的方法 - can't find referenced method in class with Proguard Android ProGuard:找不到引用的类 - Android ProGuard: can't find referenced class Proguard android找不到引用的类 - Proguard android can't find referenced class Proguard:找不到引用的类 - Proguard: can't find referenced class 在Gradle中使用Proguard - 找不到引用的类java.lang.String - Using Proguard in Gradle - can't find referenced class java.lang.String Proguard找不到引用的com.google.ads.internal.state.AdState类 - Proguard can't find referenced class com.google.ads.internal.state.AdState 如何修复proguard警告'找不到引用的方法'用于类java.lang.Object的现有方法'clone'和'finalize' - how to fix proguard warning 'can't find referenced method' for existing methods 'clone' and 'finalize' of class java.lang.Object Proguard:在库类java.lang.Throwable中找不到引用的方法'void addSuppressed(java.lang.Throwable)' - Proguard: can't find referenced method 'void addSuppressed(java.lang.Throwable)' in library class java.lang.Throwable 警告:找不到引用的类 - Warning:can't find referenced class 使用proguard构建Android Studio版本:在程序中找不到引用的字段 - Android Studio release build with proguard: can't find referenced field in program
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM