一、安装依赖
yarn add react-native-camera
二、link到native
// link
yarn react-native link react-native-camera
三、build.gradle调整
// android/app/build.gradle 添加如下
android {
defaultConfig {
missingDimensionStrategy 'react-native-camera', 'general'
multiDexEnabled true
}
}