More than one file was found with OS independent path 'META-INF/LICENSE' | Error:Could not read \build\intermediates\typedefs.txt (系统找不到指定的文件。)

FAQ1:

Error:Could not read E:\new\PlatformLibrary\CommonLibrary\build\intermediates\typedefs.txt: E:\new\PlatformLibrary\CommonLibrary\build\intermediates\typedefs.txt (系统找不到指定的文件。)

 

FAQ2:
Error:Execution failed for task ':TerminalLibrary:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'META-INF/LICENSE'
Information:BUILD FAILED

 

Resolve_FAQ1:

在报该编译错误的module的build.gradle中加入如下配置项,排除掉中间生成的typedxx.txt文件

    packagingOptions {
        exclude 'typedefs.txt'
    }

 

Resolve_FAQ2:

在报该编译错误的module的build.gradle中加入如下配置项,排除掉中间生成的META-INF/xxx文件

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

 

ref:
Gradle: Error: more than one library with package name 'com.google.android.gms' - Stack Overflow
http://stackoverflow.com/questions/23494872/gradle-error-more-than-one-library-with-package-name-com-google-android-gms/37772331

posted @ 2017-04-10 17:45  petercao  阅读(26157)  评论(0编辑  收藏  举报