Android Gradle plugin 0.7.0: “duplicate files during packaging of APK”

后端 未结 20 2454
谎友^
谎友^ 2020-11-22 08:51

Using Android Gradle plugin 0.7.0 with the following build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }

    dependenci         


        
相关标签:
20条回答
  • 2020-11-22 09:24

    Have a look at Sakiboy's comment!


    Outdated answer

    From Gradle 0.9.1 the following is supported:

    android.packagingOptions {
        pickFirst 'META-INF/LICENSE.txt'
    }
    

    More information in the Gradle release notes.

    0 讨论(0)
  • 2020-11-22 09:24
      packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }
    
    0 讨论(0)
提交回复
热议问题