programing

Xcode 10으로 업그레이드 한 후 문제 : 빌드 입력 파일을 찾을 수 없음

nasanasas 2020. 10. 25. 12:24
반응형

Xcode 10으로 업그레이드 한 후 문제 : 빌드 입력 파일을 찾을 수 없음


어제 밤에 Xcode SDK를 버전 10으로 업그레이드 한 후 빌드 할 수 없습니다.

이 오류가 발생합니다.

빌드 입력 파일을 찾을 수 없음 : '/Users/call01/Library/Developer/Xcode/DerivedData/Comp-Lite-Apps-gytvmossqptokeafrddvvmnlzadk/Build/Products/Debug-iphoneos/SG11.app/SG11

업그레이드 전에 존재하지 않았으며 되돌리고 싶지만이 문제를 해결할 수 있으면 버전 10을 계속 사용하고 싶습니다.


Legacy Build System( File > Project Settings > Workspace Settings > Legacy Build System) (으 )로 다시 전환 해보십시오.


나를 위해 Xcode 10에서이 솔루션은 매력적으로 작동했습니다. 복구 된 참조 폴더로 이동하여 모든 파일을 빨간색으로 제거하고 적절한 참조와 함께 다시 추가하십시오.

여기에 이미지 설명 입력


프로젝트에 속하는 Swift 파일 또는 파일의 경우 :

Build input file cannot be found: PATH/TO/FILE/FILE.swift

이 문제는 파일 또는 폴더가 프로젝트에서 제거되거나 이동 된 경우 발생할 수 있습니다.

그것을 해결하기 위해 :

1. 프로젝트 탐색기로 이동하여 프로젝트를 선택하십시오.

2. Build Phases선택

3. Compile Sources섹션에서 Xcode가 불평하는 파일을 확인하십시오.

4. 파일의 경로가 잘못된 것을 확인하고 빼기 아이콘을 클릭하여 삭제합니다.

5. 더하기 아이콘을 클릭하여 파일을 다시 추가하고 프로젝트에서 검색합니다.

6. 제품> 빌드 폴더 정리

7. 빌드 ✔️


위의 솔루션은 결국 저에게 효과적입니다. 그러나 마지막으로 성공적으로 컴파일하려면 몇 가지 추가 단계를 수행해야합니다. (이러한 추가 단계는 Xcode 9에서도 필요했습니다.)

  1. Xcode : 파일-> 작업 공간 설정-> 빌드 시스템 : 레거시 빌드 시스템
  2. Xcode : 제품-> 청소
  3. 회전하여 "iPhone 8", "iPhone 8 Plus"등과 같은 다른 에뮬레이터 유형을 통해 컴파일합니다 (실패 할 수도 있고 아닐 수도 있음).
  4. 결국 "일반 iOS 장치"에서 컴파일

이것은 Xcode 10에서 나를 위해 일했습니다.

  • Xcode 프로젝트에서 프로젝트 아이콘 / 이름을 클릭하십시오.
  • 일반 탭으로 이동
  • ID 섹션에서 [info.plist 파일 선택]을 클릭합니다.
  • info.Plist 파일 선택
  • info.plist가 성공적으로로드되었는지 확인하려면 정보 탭을 확인하십시오.
  • 빌드 및 실행

재미있게도 Xcode를 닫고 다시 여는 것으로도 충분할 수 있습니다.


이 문제를이 방법으로 해결했습니다. 프로젝트의 빌드 단계로 이동합니다 (맨 위에있는 프로젝트 아이콘을 클릭 한 다음 빌드 단계를 클릭). 거기에서 파일을 검색하십시오. 있는 경우 (회색으로 표시됨) 삭제하십시오. 그런 다음 청소 (shift + alt + command + k)하고 실행하십시오! 도움이 되었기를 바랍니다.


오류가 Info.plist를 찾을 수 없다고 표시되고 잘못된 경로를 찾고있는 경우 다음을 수행하십시오.

  1. 네비게이터에서 프로젝트를 선택한 다음 대상을 선택하십시오.
  2. "Build Settings"를 선택하고 "plist"를 검색합니다.
  3. Info.plist 파일이라는 옵션이 있어야합니다. 위치를 올바른 위치로 변경하십시오.

프로젝트 파일이있는 오른쪽 탐색 창을 열거 나 JSUT에서 cmd + 1을 클릭 한 다음 "Recovered References"폴더를 검색하여 모든 빨간색 파일을 엽니 다 (삭제). 그러면 모든 것이 잘 작동합니다.


위의 어느 것도 나를 위해 일하지 않았지만 이것은했습니다.

  1. Finder에서 프로젝트를 열고 .xcodeproj 파일을 마우스 오른쪽 버튼으로 클릭하고 패키지 콘텐츠를 표시합니다.
  2. 텍스트 편집기에서 project.pbxproj 열기
  3. 누락 된 파일에 대한 참조 찾기
  4. path = "path/to/file.swift"디스크의 실제 위치를 편집 하고 파일을 저장하십시오.
  5. 프로젝트 재 구축

내 단위 테스트를 구축하기 위해 이런 일이 발생했습니다. 예제 테스트를 삭제했기 때문에 발생했을 수 있습니다.

단위 테스트 번들을 제거한 다음 아래 그림과 같이 다시 추가했는데 모든 것이 다시 잘되었습니다.

여기에 이미지 설명 입력

여기에 이미지 설명 입력


최근에 새로운 빠른 버전으로 업그레이드 한 후 비슷한 문제가 발생했습니다. 파일을 이동하면 xcode 프로젝트가 더 이상 프로젝트 디렉토리에없는 항목을 참조하여 오류 코드 빌드 입력 파일을 찾을 수 없습니다.

내 상황에서는 어떻게 든 아래에 설명 된대로 참조되는 여러 파일 / 이미지가 있습니다.여기에 이미지 설명 입력

위 이미지에서.

  • 타겟 페이지로 이동합니다.
  • 그런 다음 상단의 빌드 단계 탭을 클릭하십시오.
  • 아래로 스크롤하여 번들 리소스 복사
  • 영향을받는 파일을 찾아 제거하십시오. (삭제를 누르거나 선택하고 마이너스 버튼을 누르십시오)

It was in here that I somehow had multiple files and images that were being referenced from other folders and the build would fail as they could no longer find them. And I could not find them either! or how Xcode was still referencing them

I hope this helps someone else !


I had the same issue. The problem was that I didn't have any file under the Target > Build Phases > Compile Sources. The problem was solved after I added at leas one file to Compile Sources.


Just check the path to .plist file in Build Settings of your target

여기에 이미지 설명 입력


  1. Go to Xcode-> File -> Project Setting
  2. Change Build System:-"Legacy Build System".
  3. Clean,Build and hit Run.

What Xcode was complaining about was a XIB file I got it working by going to Project -> Build Phases -> Copy Bundle Resources, removing the "problematic" XIB, cleaning (CMD+Shift+K), building and adding it back again.


There is also one possibility that sometimes when you move your files to different folder and especially when you move your info.plist to other folder, you need to define the location of that file. To solve this problem, simply click on your project blue icon on the top, and you will see a button in place of project name and bundle id, click on it and locate the info.plist file there, clean and compile happily.


I ran into this problem soon after upgrading to Xcode 10, but that was not the issue.

I tried changing the build system, but that gave me a separate error that meant the same thing. Generally saying "File X can not be found".

There are multiple things to check when a file can not be found.

  1. Recovered references Folder Apple does this nice thing where if it detects a reference to a file that doesn't exists it will add this reference into a group called "Recovered References"

That is nice of Apple but it doesn't always work.

  1. Build Phases Compile Sources In this list, there could be meta data for a file that the project is suppose to compile, but the file does not actually exists and it's attempting to find the file at the given path. In this list it will be dimmed out, delete them and re-add them by toggling the file's target dependencies or manually removing it and dragging it in.

  2. File's Path Double check the file path that the error is printing out and the file path for the file in finder. You can easily see this by clicking on the file in Xcode and checking the "Show the file inspector" tab (the left most tab). If these paths are correct then you are good!

  3. Dimmed out files in your project that are not in recovered references or red This one pissed me off because it's not obvious about what happened, but basically if you go into finder and move a file to a different location with out updating the reference in the project it will throw the error as the file no longer exists there. The only indication I have found for that is that the file in the "Project Navigator" tab (left most tab) is very slightly dimmed, but when you go to delete this file Xcode doesn't prompt you to delete the reference or send to trash. You can fix this by deleting the file and re-adding it to the project or going to the "File Inspector" tab and click the folder icon next to the path and change it to the proper location.

Either way, the error indicates that it can't find a file, switching to the old build system is a bandaid for a more concrete issue. We as developers understand that a compiler just wants an artifact to be listed at the end of a file path. Somewhere the path is not correct! We have to find where that is!

My issue was resolved with item 4 listed above. Hope this helps somebody.


Not that I did anything wrong, but I ran into this issue for a completely different reason and kinda know what caused this.

I previously used finder and dragged a file into my project's directory/folder. I didn't drag into Xcode. To make Xcode include that file into the project, I had to drag it into Xcode myself later again.

But when I switched to a new branch which didn't have that file (nor it needed to), Xcode was giving me this error:

Build input file cannot be found: '/Users/honey/Documents/xp/xpios/powerup/Models Extensions/CGSize+Extension.swift'


I did clean build folder and delete my derived data, but it didn't work until I restarted my Xcode.


File>Project Settings>Change Build Systems to Legacy Build Systems


In my case I accidentally deleted one third-party xcodeproj folder I used in my app.


This worked for me

  1. try deleting the red colored files
  2. delete the files in derived data
  3. clean the build folder
  4. then try building by using "new build system" from file->workspace settings

참고URL : https://stackoverflow.com/questions/52401856/problems-after-upgrading-to-xcode-10-build-input-file-cannot-be-found

반응형