【发布时间】:2015-07-21 08:59:38
【问题描述】:
尝试通过 SBT 构建 Android 应用程序,我发现我可以 android:package 很好,除非我将 "net.databinder.dispatch" %% "dispatch-core" % "0.11.2" 添加到 libraryDependencies。如果我添加它,那么我会收到以下(非常长的)Proguard 错误(full text):
Note: org.jboss.netty.util.internal.ByteBufferUtil: can't find dynamically referenced class java.nio.DirectByteBuffer
Note: org.jboss.netty.util.internal.ByteBufferUtil: can't find dynamically referenced class sun.misc.Cleaner
Note: there were 2 unresolved dynamic references to classes or interfaces.
Warning: there were 1828 unresolved references to classes or interfaces.
You should check if you need to specify additional program jars.
You may need to add missing library jars or update their versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 7 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
Warning: there were 8 unresolved references to library class members.
You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
前面有几千行。 android:compile 添加或不添加 Dispatch 都可以正常工作。
查看dispatch-classic 文档表明 Dispatch 在 Android 上不能很好地工作,但提到“未来迁移到不同的后端”(可能在最新版本的 dispatch 中实现)将纠正这个问题。
除了dispatch-classic 可用的信息外,我找不到任何关于 Dispatch 和 Android 的信息。
问题还存在吗?我应该只使用不同的库吗?是否可以修改我的proguard-sbt.txt 以确保android:package 可以运行?
【问题讨论】:
标签: android scala sbt proguard