为什么 Xcode 在设备构建与模拟器中不包含资源

发布于 2024-08-27 02:40:58 字数 136 浏览 7 评论 0原文

我遇到一个问题,图像资源 (Default.png) 包含在模拟器的构建中,但在为设备构建时未包含该资源。我已经通过查看 *.app 包内容验证了这一点?我还验证了该资源已被选择作为活动目标。关于我还可以看什么来调试这个有什么想法吗?

谢谢。

I have an issue where an image resource (Default.png) is included in a build for the simulator but is not being included when built for device. I have verified this by looking at the *.app package contents? I have also verified that the resource is selected for the active target. Any thoughts on what else I can look at to debug this?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

请别遗忘我 2024-09-03 02:40:58

查看图像名称,如果 Default.png 实际上是 default.png ,则模拟器构建得很好。但是在构建设备文件名时区分大小写。

Look the image names, the simulator builds fine if Default.png is actually default.png . But when building for device file names are case sensitive.

遮云壑 2024-09-03 02:40:58

尝试将其从项目中删除并重新添加。我不知道为什么或如何,但参考文献可能在某个地方丢失了。重新添加它应该可以排除这种可能性。

如果将其重新添加到项目后仍然没有包含在内,则开始假设文件本身有问题(可能是其编码),这可能会导致它在模拟器而不是设备上工作。

Try removing it from the project and re-adding it. I don't know why or how, but it's possible that the reference got lost somewhere. Re-adding it should rule out that possibility.

If it still isn't included after re-adding it to the project, then start to work with the assumption that there is something wrong with the file itself, perhaps its encoding, which may cause it to work on the simulator rather than the device.

不顾 2024-09-03 02:40:58

您应该清理您的目标(构建->清理所有目标)并重试。文件编码错误似乎不太可能。虽然我猜这是可能的。

You should clean your target (Build->Clean All Targets) and try again. It seems pretty unlikely that the file encoding is wrong. Though I guess it's possible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文