commons-codec-1.9.jar …在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
下载 ‘org.apache.http.legacy.jar’ 文件并将其粘贴到 project / app / libs中
并在 “ build.gradle”中 添加依赖 项
如果您在gradle中的依赖项中有以下行,则不要在项目中添加其他行来添加jar文件。
compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12'
无需导入任何commons-logging-1.2.jar文件