Expo react-native:.png 图像未显示在 testflight 应用程序上(在开发中工作正常)

Posted

技术标签:

【中文标题】Expo react-native:.png 图像未显示在 testflight 应用程序上(在开发中工作正常)【英文标题】:Expo react-native: .png image not showing on testflight app (working fine in dev) 【发布时间】:2020-11-15 23:19:06 【问题描述】:

Expo SDK 版本:38

app.json 包括 "assetBundlePatterns": ["**/*"]

样式组件用于显示图像

const NameWrapper = styled.Image`
  height: 52px;
  width: 68px;
  margin-top: 5px;
`;

<NameWrapper source=require("../../../assets/WelcomeScreenLogo.png") />

<WelcomeImage source=require("../../../assets/WelcomeScreen.png")
  resizeMode="contain"
/>

这些图像均未在试飞中显示,但在开发模式下工作正常。

【问题讨论】:

【参考方案1】:

更新到 SDK 39 可以正常工作。

【讨论】:

以上是关于Expo react-native:.png 图像未显示在 testflight 应用程序上(在开发中工作正常)的主要内容,如果未能解决你的问题,请参考以下文章

使用 Expo 在 react-native 上共享图像和文件

Expo Jest 找不到像“file@2x.png”这样的图像

如何在 Android 上减小 expo/react-native 应用程序的大小

如何在 react-native 中将 JPG 图像转换为 PNG

React-native (expo) - 无效类型

使用 react-native (expo) 切换手电筒