Sau khi cập nhật từ Xcode 8.1 lên 8.2, tôi đang đối mặt với một lỗi trình biên dịch Swift trong dự án của tôi. Tôi đang sử dụng phiên bản Swift mới nhất và Carthage để quản lý sự phụ thuộc. Nó hoạt động hoàn toàn tốt với Xcode 8.1, và bây giờ tôi đã cố gắng hàng giờ để sửa nó bằng cách làm sạch DerivedData
và dữ liệu Mô phỏng, làm sạch trong Xcode và xóa thư mục Build
nhưng không có gì có vẻ hữu ích. Tôi chỉ có một phiên bản Xcode được cài đặt.Xcode 8.2, Trình biên dịch Swift Lỗi: lỗi: tệp đầu vào bất ngờ
tôi nhận được lỗi biên dịch sau:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
cd <ProjectSource>
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk
export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
-- all files to compile --
unknown>:0: error: unexpected input file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code
Các thư mục mà nó được đề cập đến ngoại hình như thế này:
Nó thực sự là có vì vậy tôi không có đầu mối về những gì là đang diễn ra ... Trợ giúp được nhiều người đánh giá cao! :)
Google có xây dựng OK nếu bạn đặt thiết bị thành thiết bị iOS chung không? –
Không, nó giống như –
Tôi đã gặp vấn đề tương tự đối với tôi là do làm lộn xộn cờ nhanh. Tôi nghĩ rằng nó phải được giới thiệu khi tôi loại bỏ cocopods, để lại một -D. – wayju