Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #8

Open
ChesterYue opened this issue Mar 11, 2017 · 4 comments
Open

Crash #8

ChesterYue opened this issue Mar 11, 2017 · 4 comments

Comments

@ChesterYue
Copy link

fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=261 "The file “XXXXX” couldn’t be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/Users/XXXXX, NSStringEncoding=4}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-800.0.63/src/swift/stdlib/public/core/ErrorType.swift, line 178

@bluesky0109
Copy link

fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=261 "The file “xxxxxClass.h” couldn’t be opened using text encoding Unicode (UTF-8).

@ming1016
Copy link
Owner

@bluesky0109 这个可能是这个文件的编码问题,换成UTF-8试试呢

@Jinzhengxuan
Copy link

Jinzhengxuan commented Jan 17, 2018

下面这行崩溃:
let content = try! String(contentsOf: fileUrl!, encoding: String.Encoding.utf8)
日志:
2018-01-17 10:50:14.466665+0800 SMCheckProject[58308:1771015] Unknown Window class (null) in Interface Builder file,
creating generic Window instead

问题是崩溃指到的文件是三方sdk中的,没法修改。

@ming1016
Copy link
Owner

@Jinzhengxuan 可以不选择第三方sdk,只选择自己项目工程代码目录

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants