英文:
React native camera package causing build to fail
问题
无法找到关于这个的详细信息。
我们有一个标准的React Native CLI项目。
版本
- React: 18.2.0
- React Native: 0.71.1
就我所知,没有编辑任何配置文件的内容。
我们已添加以下npm包以访问和管理相机使用
npm install react-native-vision-camera
没有在应用程序的任何地方导入该包。现在构建失败,出现以下输出。
我尝试了各种不同的npm相机包,它们都遇到了类似的问题。
如果我卸载该包,应用程序将再次成功构建。
有什么想法我在哪里出错了吗?
英文:
Unable to find much info on this.
We have a standard React-native CLI project.
Versions
- React: 18.2.0
- ReactNative: 0.71.1
None of the configuration files have been edited from default as far as i'm aware.
We have added the following npm package to access and manage camera usage
npm install react-native-vision-camera
Without importing the package anywhere in the app. The build is now failing with the following outputs.
I've tried various npm camera packages, they have all suffered similar issues.
If I uninstall the package. The app builds fine again.
Any ideas what i'm doing wrong?
答案1
得分: 1
你需要告诉此包使用正确的Kotlin版本。尝试将以下行添加到你的 android/build.gradle
文件中:
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
// For @react-native-community/netinfo package
androidXCore = "1.0.2"
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
kotlin_version = '1.6.20' // <-- 添加这一行
kotlinVersion = '1.6.20' // <-- 添加这一行
}
...
...
...
}
英文:
You need to tell this package to use the correct Kotlin version. Try to add the following lines to your android/build.gradle
file:
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
// For @react-native-community/netinfo package
androidXCore = "1.0.2"
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
kotlin_version = '1.6.20' // <-- Add this
kotlinVersion = '1.6.20' // <-- Add this
}
...
...
...
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论