Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到了一个 DEX 错误(已经添加了类..),因为 mina 依赖于 slf4j-api,并且 slf4j-android 在内部也携带了一些 slf4j-api。有没有办法在仍然使用 gradle 外部(基于 maven)依赖项的同时解决这个问题?
dependencies { compile('org.apache.mina:mina-core:2.0.7') compile 'org.slf4j:slf4j-android:1.6.1-RC1' }
答案似乎是排除模块(子依赖)的能力:
dependencies { compile('org.apache.mina:mina-core:2.0.7') { exclude module: 'slf4j-api' } compile 'org.slf4j:slf4j-android:1.6.1-RC1' }