当我运行我的应用时,它会在android studio中显示此错误:error: package org.opencv.core does not exist
我想在我的项目中实现react-native-documentscanner-android。 这是我的配置:
System: OS: macOS 10.15 CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz Memory: 108.92 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.2.1 - /usr/local/bin/node Yarn: 1.16.0 - ~/.yarn/bin/yarn npm: 6.11.3 - /usr/local/bin/npm IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: /undefined - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1
这是我的ScanScreen.js
文件:
import React, { Component } from 'react'
import { Text, View, StyleSheet } from 'react-native'
import DocumentScanner from 'react-native-documentscanner-android'
export default class MyDocuments extends Component {
render() {
return (
<View style={css.container}>
<DocumentScanner
onPictureTaken={data => {
console.log(data.path);
}}
enableTorch={false}
detectionCountBeforeCapture={5}
/>
</View>
)
}
}
const css = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: "center",
backgroundColor: '#FFBB00',
},
})