【发布时间】:2019-09-11 11:31:29
【问题描述】:
使用 Expo 的 BarCodeScanner 扫描条形码时应用程序崩溃
我对编程和展览很陌生,所以我提前为缺乏精确度道歉。
我使用 Expo 34.0.1 创建了一个应用程序,我使用了expo’s expo-barcode-scanner。该应用程序在expo start 上完美运行;但是,当我运行expo build:android 时,扫描失败。相机会打开,但只要扫描到代码,应用就会重新启动。
(我没有在IOS上测试过)
"expo": "^34.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"sdkVersion": "33.0.0",
import { BarCodeScanner } from 'expo-barcode-scanner';
import * as Permissions from 'expo-permissions';
<BarCodeScanner
onBarCodeScanned={this.handleBarCodeScanned}
style={StyleSheet.absoluteFill}
>
</BarCodeScanner>
我希望它可以像在开发中一样工作,但应用程序会在扫描代码后立即重新启动
谢谢!
【问题讨论】:
标签: android react-native build expo barcode-scanner