主包中具有相同名称的资源

时间:2021-05-03 09:43:02

标签: ios swift xcode resources mainbundle

在一个 iOS 应用程序中,我碰巧有音频资源,用例很自然地调用两个不同的资源“001.mp3”并将它们放在两个不同的文件夹中:Folder_1 和 Folder_2。结果:

Folder_1/001.mp3
Folder_2/001.mp3

但问题是Xcode不喜欢它。

我收到如下错误消息:

Multiple commands produce '/Users/.../001.mp3':
1) Target 'MYAPP' (project 'MYAPP') has copy command from '../Folder_1/001.mp3' to '.../Build/Products/Debug-iphoneos/MYAPP.app/001.mp3'
2) Target 'MYAPP' (project 'MYAPP') has copy command from '../Folder_2/001.mp3' to '.../Build/Products/Debug-iphoneos/MYAPP.app/001.mp3'

我不可能有这种情况吗? (在这种情况下,我需要找到一些解决方法)

或者有什么具体的方法可以处理这种情况?

0 个答案:

没有答案