我参与了Android应用程序的开发,这是一个相当"厚"的Web服务移动客户端.它与服务器进行大量通信,但也有很多内部逻辑.所以,我决定使用Google Guava
库的一些特性来简化开发过程.下面是我非常感兴趣的特性列表:不可变集合、基本UTIL、集合扩展、函数编程糖和习惯用法(common.collect
和common.base
)、原语实用程序(common.primitives
)、哈希实用程序(common.hash
)、并发UTIL(future 和AsyncFunction
).我想在Android中使用的东西有:common.cache
(见下面的问题)、common.eventbus
(我们有更好的特定于Android的LIB,比如Otto)、common.io
(我们现在可以在Android中使用okio).
我读到使用Guava for Android会显著减慢编译过程,还会降低整个运行时性能: Bad performance with Guava Cache on Android(在这种情况下是合理的,不需要为Android使用Guava的缓存)和 Adding Google Guava to Android project - significantly slows down the build
那么,在Android项目中使用Guava库是否有效,或者该库仅用于服务器端开发,我应该使用标准解决方案?任何解释都将不胜感激.