问题背景:

ionic3项目上,添加cordova-plugin-cszbar,编译运行在android平台上 ,结果编译不成功。出现以下问题。

Element uses-feature#android.hardware.camera at AndroidManifest.xml:23:5-84 duplicated with element declared at AndroidManifest.x
ml:17:5-60
E:\xxxx\xxx\xxx\app\platforms\android\AndroidManifest.xml Error:
Validation failed, exiting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed with multiple errors, see logs

多次移除安卓平台重新编译依旧这个问题。

编译后打开androidMainfest.xml文件在构建后有以下内容

<uses-feature android:name="android.hardware.camera" android:required="false" />

<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />

<uses-feature android:name="android.hardware.camera.flash" android:required="false" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-feature android:name="android.hardware.camera" />

<uses-feature android:name="android.hardware.camera.autofocus" />

平台信息:

问题原因:

原因是我已经安装了一个插件也是跟cordova-plugin-cszbar功能相同

解决方案:

1.最简单的方法是移除我之前安装的那个插件。

2.假如出现这种情况,两个插件都想同时存在。因为这两个插件他们都有相同的uses-feature.所以编译后会将引用插件的重复的权限条目添加到了androidMainfest.xml,

添加好androidp平台后,打开AndroidManifest.xml文件,可以看类似于:<uses-permission android:name="android.permission.CAMERA" /> 删除,重新构建,结果没有报错了。

解决添加codova plugin 编译出现问题:Execution failed for task ':processDebugManifest'.的更多相关文章

  1. android开发里跳过的坑——android studio 错误Error:Execution failed for task ':processDebugManifest'. > Manifest merger failed with multiple errors, see logs

    使用AS在gradle里配置了多个定制版本,发现在编译版本切换时,会出现错误: Error:Execution failed for task ':processDebugManifest'.> ...

  2. gradle编译出错:Execution failed for task &#39;:app:compileTestDebugJava&#39;.

    今天更新了android studio,从0.5.3升级到0.6.1版本号,结果在IDE中编译时没有问题.可是在命令行时编译就会出现下面错误: :app:compileTestDebugJava FA ...

  3. gradle编译出错:Execution failed for task ':app:compileTestDebugJava'.

    今天更新了android studio,从0.5.3升级到0.6.1版本,结果在IDE中编译时没有问题,但是在命令行时编译就会出现以下错误: :app:compileTestDebugJava FAI ...

  4. Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.

    今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...

  5. Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details

    Android Studio 编译中断.... Error:Execution failed for task ':app:mergeDebugResources'. > Some file c ...

  6. TensorFlow Android Camera Demo 使用android studio编译安装和解决Execution failed for task ':buildNativeBazel'报错

    可以参考官网:https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android#android-stud ...

  7. 我的Android进阶之旅------&gt;解决:Execution failed for task &#39;:app:transformResourcesWithMergeJavaResForDebug&#39;.

    错误描写叙述 今天在Android Studio项目中添加了jackson的开发包,编译执行时候.引发了例如以下的错误: Error:Execution failed for task ':app:t ...

  8. 关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法

    Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 2018年 ...

  9. 我的Android进阶之旅------>解决:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    错误描述 今天在Android Studio项目中加入了jackson的开发包,编译运行时候,引发了如下的错误: Error:Execution failed for task ':app:trans ...

随机推荐

  1. 如何高效的学习 TensorFlow 代码?

    https://www.zhihu.com/question/41667903 Linux[公共基础]:TensorFlow的主要运行平台之一就是Linux,但是正式版对Windows的支持日趋完善, ...

  2. 86、UIWindow简单介绍

    一.介绍 UIWindow是一种特殊的UIView,通常在一个app中只会有一个UIWindow ios程序启动完毕后,创建的第一个视图控制器 ,接着创建控制器的view,最后将控制器的view添加到 ...

  3. select下拉框左右变换

    效果图: 使用jQuery插件---multiselect2side做法: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ...

  4. 使用 mybatis plus 动态数据源

    1.pom.xml 增加 <dependency> <groupId>com.baomidou</groupId> <artifactId>dynami ...

  5. Lua5.2&Lua5.3中废除的方法

    Lua5.2和Lua5.3中居然把 table.getn() 废除了, webAdd = {"QQ", "BaiDu", "SMW"} fo ...

  6. 逻辑回归 vs 决策树 vs 支持向量机(II)

    原文地址: Logistic Regression vs Decision Trees vs SVM: Part II 在这篇文章,我们将讨论如何在逻辑回归.决策树和SVM之间做出最佳选择.其实 第一 ...

  7. Javaweb 编解码流程

    参考: https://www.ibm.com/developerworks/cn/java/j-lo-chinesecoding/#N10263 https://www.cnblogs.com/ch ...

  8. 记一次bash脚本开发的经历

    现状描述与需求描述 最近梳理系统功能的时候发现现在每个月处理完数据之后,需要给别的系统传送批接口文件,接口文件的内容是来自于Oracle数据表中的数据.我每次都需要手工执行一下存储过程,让数据从正式表 ...

  9. 我的C#跨平台之旅(四):使用AOP(filter、attribute)进行系统增强

    1.使用OData提速REST API开发 引入NuGet包:Microsoft.AspNet.WebApi.OData 在启动类中添加如下配置(示例为全局配置,也可基于Controller或Acti ...

  10. Koa 学习笔记

    开始 就像官网上说的,一切框架都从一个"Hello World"开始,首先我们新建一个 package.json,内容尽量简单: { "name": " ...