我在 xCode5-iOS7中得到一个错误“没有一个输入目录包含匹配的启动映像”

我正在定义发射图像,可能只有一张图像不见了。

我按照这个网站的说明 为不同的设备创建不同大小的启动映像

所以我有7个图像与所需的大小。 但是当我把它们拖到 LaonchImages 工作表时,它需要8张图片... ... 缺少的那张叫做“ iPhone 肖像2x”,根据细节面板,我找到了它的尺寸640x960,并添加了它。

但是我得到了一个错误,编译失败了。

55311 次浏览

Select your project, go to Build Settings, search for AppIcon-2 and change it into AppIcon and you will be fine.

enter image description here

Select project file and then select target in question. In General tab there is in app icons and launch images launch image source should be "Use assets category" enter image description here

In my case the problem was solved by removing the reference to Images.xcassets and then add it to the project again.

I'm not sure what caused the problem, but it may have something to do with the fact that I moved the assets "file" from one Xcode group to another, which would be weird as the file's path remained the same, but that was also the only thing I did with the file...

We had our Asset Catalog Launch Image Set Name set in our project target. After removing this from the target and instead setting it in our project it compiled fine.

My LaunchImage file had been deleted and I had to add a new one in my xcassets.

Go to your images.xcassets. If there is no LaunchImage listed on the left, click the plus button at the bottom and navigate to new iOS launch image. enter image description here

For me the problem occurred when i have added a new watch target. Even though i had AppIcon set i was getting the error, i fixed it by removing the reference of asset catalog and added it back, you can do it by deleting the reference and add it back.

This generally happens when you have accidentally deleted Assets.xcassets. You need to follow the below steps.

  1. Right click on Assets.xcassets and select Show File Inspector.
  2. Check if the desired target has been checked under Target Membership.
  3. If its unchecked, Please select the target for which you need the Assets to be used.
  4. Clean and Build the App.

I could solve this by going to Build Settings of my target, searching for word "launch", then removing (using Backspace) "Asset Catalog Launch Image Set Name", that was set to LaunchImage.

With xcode 11.3.1 you have to select the project file and after that, select the target in question, and in the General tab under "App Icons and Launch Images" select as shown bellow. enter image description here

The Launch Image asset has been deprecated. I deleted the Launch Image asset but then I was getting compilation error.

In order to fix the error, the Launch Image asset catalog name has to be removed from Build Settings.enter image description here