我正在使用Xcode创建一个Objective-C,可可,mac应用程序。我有一个QuickTime Movie View
上载了电影。当我按运行时,它不起作用,窗口不显示,我的电影也不能播放!
Xcode告诉我:Thread 1: Program received signal: "SIGABRT"
如何使电影应用程序正常工作?
我遵循了在旧版本Xcode上制作的youtube教程,因此我不知道如何使其在Xcode 4.2上运行
这是控制台代码:
GNU gdb 6.3.50-20050815(Apple版本gdb-1708)(UTC 2011年8月8日星期一20:32:45)
版权所有2004自由软件基金会。
GDB是免费软件,受GNU通用公共许可证保护,您可以
欢迎在某些条件下进行更改和/或分发。
键入“显示复制”以查看条件。
GDB绝对没有保修。键入“显示保修”以获取详细信息。
此GDB被配置为“ x86_64-apple-darwin” .tty / dev / ttys000
[切换到进程12270线程0x0]
2012-01-18 13:59:44.191 TestMovie [12270:707]引发了未捕获的异常
2012-01-18 13:59:44.192 TestMovie [12270:707] ***-[NSKeyedUnarchiver encodeObjectForKey:]:无法解码类的对象(QTMovieView)
2012-01-18 13:59:44.194 TestMovie [12270:707](
0 CoreFoundation 0x00007fff8b3da286 __exceptionPreprocess + 198
1个libobjc.A.dylib 0x00007fff8ee9ed5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8b3da0ba + [NSException提高:格式:参数:] + 106
3 CoreFoundation 0x00007fff8b3da044 + [NSException提高:格式:] + 116
4基础0x00007fff8b6aa7d9 _decodeObjectBinary + 2714
5基础0x00007fff8b6aba4a-[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193
6基础0x00007fff8b682530-[NSArray(NSArray)initWithCoder:] + 486
7基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
8基础0x00007fff8b6a9b86 _decodeObject + 201
9 AppKit 0x00007fff8a455679-[NSView initWithCoder:] + 1051
10基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
11基础0x00007fff8b6a9b86 _decodeObject + 201
12 AppKit 0x00007fff8a546cac-[NSWindowTemplate initWithCoder:] + 3998
13 Foundation 0x00007fff8b6aa86b _decodeObjectBinary + 2860
14 Foundation 0x00007fff8b6aba4a-[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193
15 Foundation 0x00007fff8b6ab44b-[NSSet(NSSet)initWithCoder:] + 519
16基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
17基础0x00007fff8b6a9b86 _decodeObject + 201
18 AppKit 0x00007fff8a357e2d-[NSIBObjectData initWithCoder:] + 2099
19基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
20基础0x00007fff8b6a9b86 _decodeObject + 201
21 AppKit 0x00007fff8a3574d8 loadNib + 235
22 AppKit 0x00007fff8a356a28 + [NSBundle(NSNibLoading)_loadNibFile:nameTable:withZone:ownerBundle:] + 217
23 AppKit 0x00007fff8a356943 + [NSBundle(NSNibLoading)loadNibFile:externalNameTable:withZone:] + 141
24 AppKit 0x00007fff8a356886 + [NSBundle(NSNibLoading)loadNibNamed:owner:] + 364
25个AppKit 0x00007fff8a5ca637 NSApplicationMain + 398
26 TestMovie 0x0000000100001792主+ 34
27 TestMovie 0x0000000100001764开始+ 52
)
2012-01-18 13:59:44.240 TestMovie [12270:707] ***由于未捕获的异常'NSInvalidUnarchiveOperationException'而终止应用程序,原因:'***-[NSKeyedUnarchiver encodeObjectForKey:]:无法解码类的对象(QTMovieView) '
***首先抛出调用堆栈:
(
0 CoreFoundation 0x00007fff8b3da286 __exceptionPreprocess + 198
1个libobjc.A.dylib 0x00007fff8ee9ed5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8b3da0ba + [NSException提高:格式:参数:] + 106
3 CoreFoundation 0x00007fff8b3da044 + [NSException提高:格式:] + 116
4基础0x00007fff8b6aa7d9 _decodeObjectBinary + 2714
5基础0x00007fff8b6aba4a-[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193
6基础0x00007fff8b682530-[NSArray(NSArray)initWithCoder:] + 486
7基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
8基础0x00007fff8b6a9b86 _decodeObject + 201
9 AppKit 0x00007fff8a455679-[NSView initWithCoder:] + 1051
10基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
11基础0x00007fff8b6a9b86 _decodeObject + 201
12 AppKit 0x00007fff8a546cac-[NSWindowTemplate initWithCoder:] + 3998
13 Foundation 0x00007fff8b6aa86b _decodeObjectBinary + 2860
14 Foundation 0x00007fff8b6aba4a-[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193
15 Foundation 0x00007fff8b6ab44b-[NSSet(NSSet)initWithCoder:] + 519
16基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
17基础0x00007fff8b6a9b86 _decodeObject + 201
18 AppKit 0x00007fff8a357e2d-[NSIBObjectData initWithCoder:] + 2099
19基础0x00007fff8b6aa86b _decodeObjectBinary + 2860
20基础0x00007fff8b6a9b86 _decodeObject + 201
21 AppKit 0x00007fff8a3574d8 loadNib + 235
22 AppKit 0x00007fff8a356a28 + [NSBundle(NSNibLoading)_loadNibFile:nameTable:withZone:ownerBundle:] + 217
23 AppKit 0x00007fff8a356943 + [NSBundle(NSNibLoading)loadNibFile:externalNameTable:withZone:] + 141
24 AppKit 0x00007fff8a356886 + [NSBundle(NSNibLoading)loadNibNamed:owner:] + 364
25个AppKit 0x00007fff8a5ca637 NSApplicationMain + 398
26 TestMovie 0x0000000100001792主+ 34
27 TestMovie 0x0000000100001764开始+ 52
)
最佳答案
您要链接到QTKit吗?即使您的项目未引用QTMovieView
,Interface Builder也会让您添加QTKit.framework
。
您需要链接到QTKit才能使用QTMovieView。 Xcode 4将链接的库列表移动到其他位置。请参阅Xcode文档以了解在哪里找到它