1
votes

I added two libraries into my android project they are called:

commons-jexl-2.1.1.jar
commons-logging-1.2.jar

And i defined them in build.gradle as :

  1. compile files ('libs/commons-jexl-2.1.1.jar')
  2. compile files ('libs/commons-logging-1.2.jar')

When i run my program i get this error, although i deleted LICENSE.txt File. Maybe someone else had this problem before or any suggestions how to solve this?

Error:Execution failed for task ':app:packageDebug'.

Duplicate files copied in APK META-INF/LICENSE.txt File 1: C:\Users\Girts\AndroidStudioProjects\App\app\libs\commons-logging-1.2.jar File 2: C:\Users\Girts\AndroidStudioProjects\App\app\libs\commons-logging-1.2.jar

1

1 Answers

1
votes

I found solution just had to add this code in build.gradle and it will ignore it

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