由于我的项目是expo弹出的,react本机项目,而且我得到的错误本机无法在路径上找到图像
'file:///var/mobile/Containers/Data/Application/..../Library/Application%20Support/.expo-internal/assets/...'
"react": "17.0.1", "react-native": "0.64.0", "expo": "~41.0.1", "expo-error-recovery": "^2.1.0", "expo-font": "~9.1.0", "expo-modules-core": "^0.2.0", "expo-splash-screen": "^0.10.3", "expo-status-bar": "~1.0.4", "expo-updates": "^0.5.5",
我尝试过这个解决方案,但没有为我的代码使用任何解决方案。
发布于 2022-12-01 11:39:47
在我的例子中,退出世博之后,我没有更改这个AppDelegate.m文件。
请在project/ios/your_project_name/AppDelegate.m中进行这些更改,确保根据图1更改行号52至58。确保根据图2将行号92更改为98。
这对我来说很好。希望你会觉得这很有帮助。
发布于 2022-12-01 11:35:36
查一下这个
1)当弹出时,expo应该生成一个类似于以下内容的metro.config.js文件:
module.exports = {
transformer: {
assetPlugins: ['expo-asset/tools/hashAssetFiles']
}
};2)您的metro.config.js文件应该有.js扩展名,而不是.ts
https://stackoverflow.com/questions/74637713
复制相似问题