How do I resolve “Duplicate files copied in APK META-INF/*”

后端 未结 6 1608
粉色の甜心
粉色の甜心 2020-11-30 01:48

I am working at a commercial android application. I am also using some libraries licensed under different license types some of them stating the following:

If th

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 02:16

    There is a solution if you have only one license using the name license.txt (read: all license.txt copies are identical):

    packagingOptions {
       pickFirst  'META-INF/license.txt'
    }

    Otherwise, Google also released a Gradle plugin to manage dependencies licenses. See here. I didn't try it, but it looks like it's capable of aggregating every dependency, and even generating an activity displaying all of those licenses.

提交回复
热议问题