我有一个使用SBT + ProGuard进行构建的Android Scala应用。
在图书馆项目中,我有以下内容:
package es.fcc.bibl.bd.sincr
class Columna[T] { ... }
class TablaBase {
lazy val columnas: List[Columna[_]] = ....
}
trait Soporte {
this: TablaBase =>
def fabricaSoporte(w: Writer, cols: List[Columna[_]] = columnas) {
}
在我的应用程序代码中,我有这个:
package es.fcc.incidencias.bd
object sgiein extends TablaBase with Soporte { .... }
在构建我的项目时,我得到了这些神秘的错误:
Warning: es.fcc.incidencias.bd.sgiein: can't find referenced method 'void es$fcc$bibl$bd$sincr$TablaBaseSincronizada$_setter_$cols_$eq(scala.collection.immutable.List)' in program class es.fcc.incidencias.bd.sgiein$
Warning: es.fcc.incidencias.bd.sgiein: can't find referenced method 'scala.collection.immutable.List cols()' in program class es.fcc.incidencias.bd.sgiein$
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
问题与参数的默认值有关cols
。如果我删除该参数,一切正常。
我试图将ProGuard选项更改为以下选项,但没有运气:
-keepclassmembers class es.fcc.bibl.bd.sincr.TablaBaseSincronizada* {
** *(**);
}
-keepclassmembers class es.fcc.incidencias.bd.* {
** *(**);
}
我不明白为什么会遇到这个问题。
我得出的结论是可以安全地忽略这些错误。
一定是的内部错误ProGuard
。
为此-dontwarn
,请在ProGuard
配置中使用指令。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句