react-native-camera安装错误

杨昆
2023-12-01
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :react-native-camera.

解决方案

在android/app/build.gradle文件defaultConfig配置中添加missingDimensionStrategy 'react-native-camera', 'general',然后再编译即可

defaultConfig {
   applicationId "com.****.***"
   minSdkVersion rootProject.ext.minSdkVersion
   targetSdkVersion rootProject.ext.targetSdkVersion
   versionCode 1
   versionName "1.0"
   missingDimensionStrategy 'react-native-camera', 'general'
}

 类似资料: