【发布时间】:2019-08-04 19:01:54
【问题描述】:
我升级到 expo 34.0.3 及相关依赖如下
"dependencies": {
"@expo/samples": "3.0.3",
"@expo/vector-icons": "^10.0.3",
"add": "^2.0.6",
"expo": "^34.0.3",
"expo-asset": "^5.0.1",
"expo-font": "~6.0.1",
"moment": "^2.24.0",
"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"react-native-gesture-handler": "^1.3.0",
"react-native-modal": "^11.3.1",
"react-native-modal-datetime-picker": "^7.5.0",
"react-native-snackbar-component": "^1.1.0",
"react-navigation": "^3.11.1",
"react-redux": "^7.1.0",
"redux": "^4.0.4",
"redux-persist": "^5.10.0"
},
我的 App.js 大概正确地预加载了这样的字体
import * as Font from 'expo-font';
import * as Icon from '@expo/vector-icons';
.........
_loadResourcesAsync = async () => {
return Promise.all([
Font.loadAsync({
...Icon.Ionicons.font,
...Icon.MaterialCommunityIcons.font,
}),
]);
};
现在要明确一点,此代码在 expo 升级之前运行良好。 在 Android 和 iOS 设备上都会出现此问题。
【问题讨论】:
-
感谢您指出,我已将 Expo 降级为 33.0,一切正常。
标签: react-native expo