在启用ProGuard的情况下编译我的
Android应用程序时出现以下错误.
Warning: library class android.databinding.tool.util.SourceCodeEscapers$1 extends or implements program class com.google.common.escape.CharEscaper Warning: library class android.databinding.tool.util.SourceCodeEscapers$JavaCharEscaper extends or implements program class com.google.common.escape.ArrayBasedCharEscaper Warning: library class android.databinding.tool.util.SourceCodeEscapers$JavaCharEscaperWithOctal extends or implements program class com.google.common.escape.ArrayBasedCharEscaper Warning: there were 3 instances of library classes depending on program classes. You must avoid such dependencies,since the program classes will be processed,while the library classes will remain unchanged. (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
这似乎是由Android data binding和Guava之间的冲突引起的.我的应用依赖于Guava(com.google.guava:guava:18.0)并启用了数据绑定. appears数据绑定对Guava有某种内部依赖性,这导致ProGuard出现问题.
我正在运行最新的测试版gradle(2.0.0-beta5),所以问题可能与此有关.