* What went wrong:
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
File1: C:\AndroidStudio\Umer_Doctor\app\libs\httpmime-4.3.5.jar
File2: C:\AndroidStudio\Umer_Doctor\app\libs\httpcore-4.3.2.jar


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

 

这个是当时抛出的异常信息,很奇怪,应该是第三方包文件冲突,下面是解决方案(如果有更了解的人欢迎详细解说下,互相学习)

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'
    }
View Code

相关文章:

  • 2021-07-12
  • 2021-08-24
  • 2021-06-04
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2021-12-15
  • 2021-11-24
相关资源
相似解决方案