我正在学习一些有关 React Native 的知识,但出现了一个我无法解决的问题。
\n\n我正在使用react-native-image-picker 我已经能够从我的设备拍摄照片,问题是我无法在设备屏幕上显示捕获的图像。
\n\n这是我的代码。
\n\nimport React from \'react\';\nimport { Button, Image, View} from \'react-native\';\n\nimport ImagePicker from \'react-native-image-picker\';\n\n\nconst TomarFoto = () => {\n const tomarFoto = () => {\n ImagePicker.launchCamera({}, (response) => {\n console.log(\'Respuesta =\', response);\n if (response.didCancel) {\n alert(\'Subida cancelada\');\n } else if (response.error) {\n alert(\'Error encontrado: \', error);\n } else {\n const source = {uri:response.uri};\n }\n });\n };\n\n return (\n\n <View style={{ flex: 1, alignItems: \'center\', justifyContent: \'center\' }}>\n <Image\n source={ uri:response.uri}\n style={ …Run Code Online (Sandbox Code Playgroud)