[RN] React Native 使用 react-native-camera 过程中报错 Found react-native-camera 'mlkit' but wasn't required.`

详细报错如下:

Could not resolve all task dependencies for configuration ‘:app:debugRuntimeClasspath‘.
Could not resolve project :react-native-camera.
Required by:
project :app
> Cannot choose between the following configurations of project :react-native-camera:
- generalDebugRuntimeElements
- mlkitDebugRuntimeElements
All of them match the consumer attributes:
- Configuration ‘generalDebugRuntimeElements‘:
- Required com.android.build.api.attributes.BuildTypeAttr ‘debug‘ and found compatible value ‘debug‘.
- Found com.android.build.api.attributes.VariantAttr ‘generalDebug‘ but wasn‘t required.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr ‘Aar‘ and found compatible value ‘Aar‘.
- Required org.gradle.usage ‘java-runtime‘ and found compatible value ‘java-runtime‘.
- Found react-native-camera ‘general‘ but wasn‘t required.
- Configuration ‘mlkitDebugRuntimeElements‘:
- Required com.android.build.api.attributes.BuildTypeAttr ‘debug‘ and found compatible value ‘debug‘.
- Found com.android.build.api.attributes.VariantAttr ‘mlkitDebug‘ but wasn‘t required.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr ‘Aar‘ and found compatible value ‘Aar‘.
- Required org.gradle.usage ‘java-runtime‘ and found compatible value ‘java-runtime‘.
- Found react-native-camera ‘mlkit‘ but wasn‘t required.`

解决办法:

android/app/build.gradle

增加:

missingDimensionStrategy ‘react-native-camera‘, ‘general‘ in defaultConfig

同时在android/build.gradle 中:

增加

maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" } 

参考:https://github.com/react-native-community/react-native-camera/issues/2150

[RN] React Native 使用 react-native-camera 过程中报错 Found react-native-camera 'mlkit' but wasn't required.`

原文地址:https://www.cnblogs.com/wukong1688/p/11029562.html

时间: 2024-08-09 04:28:43

[RN] React Native 使用 react-native-camera 过程中报错 Found react-native-camera 'mlkit' but wasn't required.`的相关文章

scrapy安装过程中报错,缺少Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools

问题: 解决办法(步骤): 1.尝试将twisted包手动下载安装(下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted) 2.当twisted安装成功后,在安装scrapy,直接使用命令 pip install scrapy 即可. 原文地址:https://www.cnblogs.com/ly803744/p/9752843.html

词云:解决pip install wordcloud安装过程中报错“error: command 'x86_64-linux-gnu-gcc' failed with exit status 1”问题

外部环境:ubuntu16.04, 64bits, 全局环境python2.7 在虚拟环境(python3.5)中执行 pip install wordcloud 时安装失败,报错: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for wordcloud Running setup.py

PXE部署系统过程中报错0x80070490如何排错?举一反三的IT技术学习方式

PXE部署系统过程中报错0x80070490如何排错?举一反三的IT技术学习方式 ?Lander Zhang 专注外企按需IT基础架构运维服务,IT Helpdesk 实战培训践行者http://blog.51cto.com/lander 2018/09/3 7:30 问题描述 相信很多同学在照着某些技术视频或博客学习SCCM服务器是都以为安装配置好了,但在测试的时候总会出现一些莫名其妙的问题,于是在网络上按错误提示去搜索,花了N多时间但进展又缓慢,还经常找不到有效的解决建议,即使找到了这个问题

配置Hystrix过程中报错: java.lang.IllegalStateException: No instances available for user-service

异常信息如下: java.lang.IllegalStateException: No instances available for user-service at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:136) ~[spring-cloud-netflix-ribbon-2.1.2.RELEASE.jar:2.1.2.REL

opencv3.0在嵌入式linux编译过程中报错的处理方法。

http://m.blog.csdn.net/blog/wanghao225225/39252757 上边链接中的文章介绍了opencv3.0的编译方法,但是编译过程中会报错. 错误1:undefined reference to `parallel_pthreads_set_threads_num(int)' ../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_set_threads_num(

ORACLE搭建Stream过程中报错【error收集】

错误一:在配置完源库和目标数据库后,创建复制管理员.连接上复制管理员后,在源库执行MAINTAIN_TABLE过程: declare v_tables DBMS_UTILITY.UNCL_ARRAY; begin v_tables(1) := 'hr.test01'; v_tables(2) := 'hr.test02'; v_tables(3) := 'hr.test03'; dbms_streams_adm.maintain_tables(table_names => v_tables, s

ambari 创建集群过程中报错

Confirm Hosts Registering your hosts.Please confirm the host list and remove any hosts that you do not want to include in the cluster. 步骤出现 Host registration aborted. 错误 解决方法: 升级openssl yum upgrade openssl 重启 ambari-server

sshd升级过程中报错问题解决汇总.txt

redhat 4.8 升级openssh 6.6 报错 现象:提示OpenSSL version mismatch. Built against 1000000f, you have信息, whereis sshd ssh:/usr/local/sshd 发现 该sshd 的路径跟 正常的 as 4.8 的路径不一样:sshd: /usr/sbin/sshd 登陆进去,发现sshd的路径为/usr/local/sbin/sshd,现在已改为/usr/sbin/sshd,现可正常登陆 more /

npm 安装过程中报错解决

安装: npm install -g truffle 下述错误 解决方式: npm config set strict-ssl false 原文地址:http://blog.51cto.com/lcylanyue/2153989