Duplicate files copied in APK META-INFO/* after importing the jar package

    After importing the httpclient package when doing the Android connection server servlet, there is a very strange problem.

The error is as follows:

Duplicate files copied in APK META-INFO/NOTICE.txt

File1.............................

File2 .............................

File3................................

This is very strange. I also did this kind of connection server servlet last year. There is no such error in importing the package. I thought it was the wrong jar package download.

                Returning to the topic, Duplicate files copied in APK META-INFO/NOTICE.txt translated into Chinese is probably (duplicate files are copied in APK's META-INFO/NOTICE.txt), searched in stack oveflow (how much English is It's important, alas), just add the following code (inside the curly brackets of android) in the module's build.gradle, which means to remove NOTICE.txt. In fact, open the jar package to see. Sure enough, there is a META-INFO folder in these jar packages , which contains files such as NOTICE.txt.

 

packageOptions{

exclude 'META-INF/NOTICE.txt'

}

Regarding packageOptions, my understanding is to package the APK according to the rules here. If I understand wrong, please enlighten me.

Alright, go to sleep!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327011156&siteId=291194637