Android Studio中如何解决重复依赖导致的app:transformClassesWithJarMergingForDebug

SWfive 2018-07-16 09:40:15
工程引入了tess-two的库
gradle console错误提示如下:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/googlecode/leptonica/android/AdaptiveMap.class

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

message如下
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/googlecode/leptonica/android/AdaptiveMap.class

按照网上的方法搜索了冲突的AdaptiveMap.class,如果存在两个以上的同名类,使用exclude的方法解决,但是只找到一个AdaptiveMap.class,并且查找了library以及extra library还有app下的jar包,除了classes.jar并没有其他相同的包,但是提示classes.jar不可以删除。
...全文
643 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Krisez 2018-07-17
  • 打赏
  • 举报
回复
https://blog.csdn.net/qq_34206863/article/details/72483589

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧