lldb - 无法解析Objective-C静态方法调用的类

Mik*_*dov 8 xcode ios lldb

lldb有什么问题?做了很多次,但现在不起作用.(Xcode 6.4和Xcode 7.0-beta)

(lldb) po [UIApplication sharedApplication]
Error [IRForTarget]: Couldn't resolve the class for an Objective-C static method call
error: 0 errors parsing expression
error: The expression could not be prepared to run in the target

(lldb) p @[@"", @""]
Error [IRForTarget]: Couldn't resolve the class for an Objective-C static method call
error: 0 errors parsing expression
error: The expression could not be prepared to run in the target

(lldb) po @[@"", @""]
Error [IRForTarget]: Couldn't resolve the class for an Objective-C static method call
error: 0 errors parsing expression
error: The expression could not be prepared to run in the target

(lldb) e id $a = @[@"11"]
Error [IRForTarget]: Couldn't resolve the class for an Objective-C static method call
error: 0 errors parsing expression
error: The expression could not be prepared to run in the target
Run Code Online (Sandbox Code Playgroud)

更新

也许这是我的iPod touch在ios 9.0测试版上的一个问题,但在我的同事的ios 8.4的iPad上运行良好.问题已经解决了.

小智 0

我找到Xcode设置:Targets->build Settings->Mach-O Type,将Dynamic Library更改为Static Library。它应该有效。