Android Gradle Duplicate files copied in APK META-INF/license.txt

前端 未结 5 619
粉色の甜心
粉色の甜心 2020-12-24 01:57

I\'m going to add RESTful Web Service support with Spring to my Android application as described here https://spring.io/guides/gs/consuming-rest-android/.

This is to

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 02:06

    This one worked for me:

        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'
        exclude 'META-INF/spring.schemas'
        exclude 'META-INF/spring.tooling'
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/spring.handlers'
    }
    configurations {
        all*.exclude module: 'classworlds'
        all*.exclude module: 'commons-logging'
        all*.exclude module: 'httpclient'
        all*.exclude module: 'maven-artifact'
        all*.exclude module: 'maven-artifact-manager'
        all*.exclude module: 'maven-error-diagnostics'
        all*.exclude module: 'maven-model'
        all*.exclude module: 'maven-project'
        all*.exclude module: 'maven-settings'
        all*.exclude module: 'plexus-container-default'
        all*.exclude module: 'plexus-interpolation'
        all*.exclude module: 'plexus-utils'
        all*.exclude module: 'wagon-file'
        all*.exclude module: 'wagon-http-lightweight'
        all*.exclude module: 'wagon-provider-api'
    
    }
    

提交回复
热议问题