构建时离子编辑时出现重复文件错误

时间:2017-02-10 22:43:23

标签: android cordova ionic-framework cordova-plugins

安装插件后,我收到以下错误:

任务执行失败':transformResourcesWithMergeJavaResForDebug'。

  

com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException:在APK META-INF / DEPENDENCIES中复制的重复文件           File1:C:\ Users \ Vinicius \ Desktop \ webapps \ paypadapp \ platforms \ android \ libs \ httpcore-4.3.2.jar           File2:C:\ Users \ Vinicius \ Desktop \ webapps \ paypadapp \ platforms \ android \ libs \ httpclient-4.3.3.jar           File3:C:\ Users \ Vinicius \ Desktop \ webapps \ paypadapp \ platforms \ android \ libs \ httpmime-4.3.3.jar

进行搜索时,我找到了以下解决方案

在android manifest中添加:

packagingOptions {
    exclude 'META-INF/NOTICE' // will not include NOTICE file
    exclude 'META-INF/LICENSE' // will not include LICENSE file
    // as noted by @Vishnuvathsan you may also need to include
    // variations on the file name. It depends on your dependencies.
    // Some other common variations on notice and license file names
    exclude 'META-INF/notice'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license'
    exclude 'META-INF/license.txt'
}

但我在哪里添加了离子/ cordova?

我从头开始创建了一个离子项目并安装了插件,发生了同样的错误

enter image description here

0 个答案:

没有答案
相关问题