2 u012761816 u012761816 于 2014.08.04 11:51 提问

ios 视频播放器播放不了
NSString *path = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp4"];
NSURL *url = [NSURL fileURLWithPath:path];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:url];
[mp.view setFrame:CGRectMake(0, 0, 320, 200)];
[mp.view setBackgroundColor:[UIColor redColor]];
[self.view addSubview:mp.view];
[mp play];

错误原因:2014-08-04 11:43:48.371 JiaJS01[3183:90b] Cannot find executable for CFBundle 0x10c037500 (not loaded)
2014-08-04 11:43:48.387 JiaJS01[3183:90b] Cannot find executable for CFBundle 0x10c13c4a0 (not loaded)
在网上搜索的方法还原模拟器不可用,还原过后依然是报这个错误

1个回答

u012761816
u012761816   2014.08.04 18:30

问题解决了,MPMoviePlayerController 应该先将它变为属性,不然会黑屏

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!