Error:Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt
File1: C:\Users\huangjie\StudioProjects\TestLean\app\libs\fastjson.jar
File2: C:\Users\huangjie\StudioProjects\TestLean\app\libs\httpmime-4.2.4.jar

意思是不同jar包间存在重复的文件,添加以下常见忽略配置于build.gradle
packagingOptions{
exclude’META-INF/DEPENDENCIES.txt’
exclude’META-INF/LICENSE.txt’
exclude’META-INF/NOTICE.txt’
exclude’META-INF/NOTICE’
exclude’META-INF/LICENSE’
exclude’META-INF/DEPENDENCIES’
exclude’META-INF/notice.txt’
exclude’META-INF/license.txt’
exclude’META-INF/dependencies.txt’
exclude’META-INF/LGPL2.1’
}

更多相关文章

  1. Android.mk添加第三方jar包
  2. 利用ContentProvider的添加数据
  3. Activity的使用(九): 读取联系人
  4. RecyclerView添加行间距
  5. 异常ExceptionInInitializerError解决方案
  6. Android(安卓)程序奔溃常见问题汇总
  7. okhttp http 重定向到https
  8. Android底层知识Window和WindowManager深入分析
  9. android中添加通过内容提供者添加联系人

随机推荐

  1. android app rate on google play and am
  2. Android 服务(本地服务示例)(二)
  3. Android中使用GridView实现标签效果源码
  4. Android 联系人选择Widget
  5. Android中判断网络连接是否可用
  6. Failed to create directory C:\ Progra
  7. 百度地图中android获取经纬度和地方名称
  8. 【移动安全】Android App Smail代码动态
  9. Android Kill App
  10. android 服务service里面出Toast