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

后端 未结 20 2998
谎友^
谎友^ 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:05

    I noticed this commit comment in AOSP, the solution will be to exclude some files using DSL. Probably when 0.7.1 is released.

    commit e7669b24c1f23ba457fdee614ef7161b33feee69
    Author: Xavier Ducrohet <--->
    Date:   Thu Dec 19 10:21:04 2013 -0800
    
        Add DSL to exclude some files from packaging.
    
        This only applies to files coming from jar dependencies.
        The DSL is:
    
        android {
          packagingOptions {
            exclude 'META-INF/LICENSE.txt'
          }
        }
    

提交回复
热议问题