问题描述
您好,我尝试用react-native-camera模块创建一个相机应用程序当我尝试在我的设备(Android移动版)上运行此应用时,出现以下错误.有人可以为此提供解决方案吗?
Hello every one i tried to create an camera app with react-native-camera modulewhen i tried to run this app on my device (android mobile) getting following error. Can any one please provide me solution for this ?
推荐答案
转到文件"MainApplication.java"(在.\ android \ app \ src \ main \ java \ com \ projectName下)
Go to file "MainApplication.java" (under .\android\app\src\main\java\com\projectName)
确保在getPackages()函数下您没有重复的行(在我的情况下,我有两次"new RCTCameraPackage()").
Make sure that under getPackages() function you don't have duplicate lines (in my case I had "new RCTCameraPackage()" twice).
也修复重复的导入.
这篇关于react-native应用程序中的canOverrideExistingModule问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!