Error code: Failed to load the image "image.png" referenced by the thread bundled with the identifier "com.bundle.identifier"

This question was asked before, and I looked through all the other stackoverflow topics for an answer, but I cannot solve the problem.

My application works fine in the simulator for all platforms, but when I run the application on my device, I get an error code: Failed to load the image "image.png" referenced by the thread complete with the identifier "com" .bundle.identifier " .

Screenshot for message on console

All my photos are .PNG files, and I used the repository to insert them into imageView.

Program: Xcode 5

+6
source share
9 answers

If you use an image name without extension, for example. [UIImage imageNamed:@"myImage"]; and then make sure your image is in .png format because Xcode will only download .png images without adding an extension, otherwise you should use a name with the extension [UIImage imageNamed:@"myImage.jpg"]; and should work.

+12
source

I had the same problem and solved it by checking the box to add it to the application in the Target Membership. So, select an image from the library, and then in the File Inspector add it to the target. It worked for me, hope it works for you too.

+6
source

Delete this image from the project and move it to the trash, and then try to re-add this image to the project by checking the copy items to folder in the target group box.

This may be causing the problem not to download the image to the device.

+4
source

I solved this problem by deleting the image named image.png in my storyboard and it worked right away. This image may also exist in your code or elsewhere.

+3
source

The first (or ultimately xib) that causes the warning is the one that loads when the message is recorded. Then you can look at the controls that use the images in the inspector and find where the image name is “Unknown image” (or maybe “image.png” in your case). You can then clear this value by setting it to some value and then clearing the value. Note that with UIButton you need to try four different “Status Configuration” values ​​(default, highlighted, selected, and disabled) to see where the invalid link is hiding.

+2
source

Removing the link and adding it back to the project did the job for me! You may need to clean the project.

+2
source

I had this problem when I accidentally added another set of images of the same name to the object directory file. I renamed it after I realized the error, but it doesn't seem to work.

Deleting the file and adding it again solves the problem.

+2
source

I found the solution to a missing file.

Original text:

For all n00bs like me ... Image must be PNG ...

+1
source

Delete the image (using the Delete link option)

Re-add it and make sure that the name of your project is selected in the add to targets section. (this usually happens when only your test objects are selected)

-1
source

Source: https://habr.com/ru/post/958908/


All Articles