11

Suddenly I am getting error in Xcode 9 beta like

"Failed to read file attributes for "/Users/path/myapp/Images.xcassets" in Xcode?" and unable to build as well I just dragged the "Images.Xcassets" folder to up that's it.

I checked targets, Copy Bundle Resources and "Images.Xcassets" folder existed. But, I am unable to build the project.

Cœur
  • 37,241
  • 25
  • 195
  • 267

5 Answers5

26

I found out that my folder name is images.Xcassets, which Group name and Full Path is Images.xcassets. You should check your group name and full path in File inspector.

enter image description here

EDIT:
Here are two solutions:
1. Remove the group from Project Navigator (ALT+1), and add files back again (OPTION+ALT+A).
2. Click the folder icon from File Inspector (OPTION+ALT+1) and choose a new folder.

Chris Yim
  • 1,392
  • 11
  • 12
12

It's an issue of latest Xcode9. There are two ways to solve this issue.

Follow these:

  1. Remove reference the images.Xcassets file from your project. Once you remove it from project and add to project again solved my problem.

enter image description here

  1. If option 1 don't work, delete(Trash) the full images.Xcassets file and add all icon again.

Make sure you add this in your icon name Build settings.

Jamshed Alam
  • 12,424
  • 5
  • 26
  • 49
7

"Quit the Xcode and restart." it worked out for me. I got the same problem with Xcode-9.0. I have tried it in multiple ways like deleting Derived data, Cleaning the project and closing the Xcode but nothing worked.

Delete your derived data and then Quit X code Cmd+q quit the xcode and open it again.

Smart guy
  • 494
  • 6
  • 9
2

I had this same problem though, using local pods. It seems that xcodebuild is now case sensitive relative to the resource path. ~/Folder/MyProject != ~/folder/MyProject

  • 1
    It's because now physical project files structure matches Xcode project files structure. xcodebuild is using Xcode project structure and is unable to find a file if physical path of file is different than defined in project. – Povilas Oct 17 '17 at 08:05
0

Closing and reopening Xcode fixed the problem for me

Fran
  • 1,206
  • 1
  • 7
  • 4