项目运行出现错误

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/lidroid/xutils/BitmapUtils$BitmapLoadTask.class

1.在app的gradle中以compile引入:

compile files('libs/xUtils-2.6.14.jar')

2.在门禁的module的gradle中以compile引入:

 compile files('libs/xUtils-2.6.14.jar')

将任意一个Module中的jar依赖为compile files('libs/xUtils-2.6.14.jar'),其他需要依赖的地方改为provided files('libs/xUtils-2.6.14.jar')

 

并且删除其他moudule的compile fileTree(include: ['*.jar'], dir: 'libs)。

1.在app的gradle中以compile引入:

compile files('libs/xUtils-2.6.14.jar')

2.在门禁的module的gradle中: provided files('libs/xUtils-2.6.14.jar')

并删除compile fileTree(include: ['*.jar'], dir: 'libs')
注意事项:在门禁的module改完后要clean project,一定要清除缓存,本人就因为这个步骤没做而一直报同个错

 

 

更多相关文章

  1. android如何让webview里的资源访问本地缓存
  2. android 图片双缓存,开源框架 universali image loader
  3. [置顶] 我的Android进阶之旅------>android异步加载图片显示,并且
  4. 【Android开源项目分析】android轻量级开源缓存框架——ASimpleC
  5. Android 使用finalBitmap实现缓存读取
  6. android 将bitmap缓存到本地
  7. Android Retrofit 笔记之一使用拦截器设置缓存

随机推荐

  1. 如何获取Android设备所支持的传感器种类
  2. 保护你的隐私,五种控制Android应用的权限
  3. Android深入浅出之Surface[1]
  4. Android状态check、focused、pressed、se
  5. android的ant编译打包
  6. 处女男学Android(十二)---Android(安卓)菜
  7. Android之monkey Test
  8. Android自定义动画三-SVG动画
  9. Android“俺拽”暗合无线互联网趋势!
  10. Android数据记录到文件中