Tôi đang sử dụng Xcode 4.6.1 trên OSX Mountain Lion 10.8.3lỗi xcode mỗi khi tôi cố gắng sửa đổi mã nguồn của mình
Tôi đã chuyển mã nguồn từ máy macbook của mình sang iMac sáng nay.
Và bây giờ, mỗi lần tôi cố gắng sửa đổi mã nguồn của mình, XCode gặp sự cố!
Ví dụ, nếu tôi bắt đầu để viết một cái gì đó như thế này: [[anyclass
XCode sẽ sụp đổ với tin nhắn này: Không thể thêm một đoạn mã sử dụng với cùng một định danh, bạn chỉ có thể ghi đè lên đoạn hệ thống.
Nhưng nếu tôi viết mã trong trình chỉnh sửa văn bản trước đó, và sau đó nếu tôi dán mã vào XCode, nó hoạt động!
Tôi không hiểu ... Tôi đã làm trống dữ liệu thu được của tôi, làm sạch dự án của tôi, làm trống thư mục/var/thư mục thư mục, khởi động lại iMac của tôi ...
Rất cám ơn sự giúp đỡ của bạn!
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4H512
ASSERTION FAILURE in /SourceCache/IDECodeSnippetLibrary/IDECodeSnippetLibrary-2055/Source/IDECodeSnippetRepository.m:320
Details: Cannot add another user snippet with the same identifier, you can only override system snippets.
Object: <IDECodeSnippetRepository: 0x4050a98c0>
Method: -addCodeSnippet:
Thread: <NSThread: 0x40030a220>{name = (null), num = 1}
Hints: None
Backtrace:
0 0x000000010b681a2a -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010a9255f4 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x000000010f40f975 -[IDECodeSnippetRepository addCodeSnippet:] (in IDECodeSnippetLibrary)
3 0x000000010f40fcfb -[IDECodeSnippetRepository _loadUserCodeSnippets] (in IDECodeSnippetLibrary)
4 0x000000010f40ee63 -[IDECodeSnippetRepository init] (in IDECodeSnippetLibrary)
5 0x000000010f4150c4 __44+[IDECodeSnippetRepository sharedRepository]_block_invoke (in IDECodeSnippetLibrary)
6 0x00007fff94b950b6 _dispatch_client_callout (in libdispatch.dylib)
7 0x00007fff94b95041 dispatch_once_f (in libdispatch.dylib)
8 0x000000010f40ecaa +[IDECodeSnippetRepository sharedRepository] (in IDECodeSnippetLibrary)
9 0x000000010f416cbe __102+[IDECodeSnippetLibraryCompletionStrategy _generateCompletionsForScopes:language:platformNames:atBOL:]_block_invoke (in IDECodeSnippetLibrary)
có vẻ như có thể liên quan đến đoạn mã Xcode. Hãy thử xóa các tệp tại '~/Library/Developer/Xcode/UserData/CodeSnippets' –
@Matthias, Bạn đã đúng! Điều này là do DropBox đã phát hiện một số xung đột trong thư mục đoạn trích của tôi. Trong tình huống đó, Dropbox tạo một bản sao của tệp với phần mở rộng .conflict nhưng có cùng tên. Và, đối với XCode, có vẻ như 2 đoạn mã có cùng tên. Rất cảm ơn vì sự giúp đỡ của bạn! – Christophe