本文介绍了Android Studio 1.5.1在APK META-INF/NOTICE.txt commons-codec-1.9.jar中复制了重复文件...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
commons-codec-1.9.jar ...在APK META-INF/NOTICE.txt中复制的重复文件
commons-codec-1.9.jar... Duplicate files copied in APK META-INF/NOTICE.txt
> Error:Execution failed for task
> ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files
> copied in APK META-INF/NOTICE.txt File1:
> C:\Users\nandkishor.mewara\AndroidStudioProjects\New folder
> (2)\CityRetails\app\libs\commons-logging-1.2.jar File2:
> C:\Users\nandkishor.mewara\AndroidStudioProjects\New folder
> (2)\CityRetails\app\libs\commons-codec-1.9.jar
推荐答案
在 project/app/libs 文件中下载并粘贴'org.apache.http.legacy.jar'文件 strong>
Download and Paste 'org.apache.http.legacy.jar' file in project/app/libs
并在'build.gradle'
如果您在gradle中的依赖项中有以下行,则不要在项目中添加任何其他行来添加jar文件.
if you have below line in your dependencies in gradle than don't add any other line for add jar file in your project.
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
无需导入任何commons-logging-1.2.jar文件
这篇关于Android Studio 1.5.1在APK META-INF/NOTICE.txt commons-codec-1.9.jar中复制了重复文件...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!