Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/197.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 生成时出现重复文件错误_Android_Cordova_Ionic Framework_Cordova Plugins - Fatal编程技术网

Android 生成时出现重复文件错误

Android 生成时出现重复文件错误,android,cordova,ionic-framework,cordova-plugins,Android,Cordova,Ionic Framework,Cordova Plugins,安装插件后,我发现以下错误: 任务“:transformResourcesWithMergeJavaResForDebug”的执行失败 com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException:APK META-INF/DEPENDENCIES中复制的重复文件 文件1:C:\Users\Vinicius\Desktop\webapps\paypad

安装插件后,我发现以下错误:

任务“:transformResourcesWithMergeJavaResForDebug”的执行失败

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

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

在android清单中添加以下内容:

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'
}
但在爱奥尼亚/科尔多瓦,我该在哪里添加呢

我从头创建了一个ionic项目并安装了插件,同样的错误也发生了