当将FastImage与我的react本地应用程序集成时,我得到了以下错误:

代码:-
import FastImage from "react-native-fast-image";
const qmeLogoURL = require('../../assets/splash-screen/logo.png');
<FastImage
style={styles.image}
source={Logo}
/>package.json
"dependencies": {
"@expo/vector-icons": "^10.2.0",
"@react-navigation/native": "^5.7.1",
"axios": "^0.19.2",
"expo": "~38.0.1",
"expo-av": "~8.2.1",
"expo-barcode-scanner": "~8.2.0",
"expo-file-system": "^9.0.1",
"expo-splash-screen": "^0.3.1",
"expo-updates": "~0.2.10",
"expo-video-player": "^1.5.8",
"prop-types": "^15.7.2",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "~0.62.2",
"react-native-camera": "^3.33.0",
"react-native-elements": "^2.0.2",
"react-native-fast-image": "^8.3.2",
"react-native-gesture-handler": "~1.6.0",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-permissions": "^2.1.5",
"react-native-web": "~0.11.7",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0",
"rxjs": "^6.6.0"
},有人能告诉我我做错了什么吗?
发布于 2020-08-08 20:33:50
首先,我在您的package.json中看到,您正在使用expo和--如果您使用的是expo管理的工作流--您不能使用这个模块,如果它是一个空工作流,那么您可以使用,看看这个模块。
https://github.com/DylanVann/react-native-fast-image/issues/704
当您的没有将您的本机模块与您的项目链接时,就会发生此错误,因此,由于自链接是在re的0.60.0版本中引入的,所以它应该是自动链接的,所以在安装了一个本机模块(re本机-快速-映像)之后,您必须重新安装该应用程序。
,如果你在IOS上,就这样做.
cd ios
pod install并重新安装该应用程序.
如果您是android上的,只需重新构建项目并重新安装应用程序,。
https://stackoverflow.com/questions/63318412
复制相似问题