CFBundle/CFPlugIn的可执行文件未找到错误

10

无法找到CFBundle/CFPlugIn 0x432bfa0的可执行文件(未加载)
无法在CFBundle/CFPlugIn 0x432bfa0中找到工厂C5A4CE5B-0BB8-11D8-9D75-0003939615B6的NewPlugIn函数指针(未加载)

这是我运行此代码时收到的错误。

NSString *path = [[NSBundle mainBundle] pathForResource:[arraySubFarts objectAtIndex:indexPath.row] ofType:@"mp3"];
NSURL *file = [[NSURL alloc] initFileURLWithPath:path];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:file error:nil];

self.player = player;
[player prepareToPlay];
[player setDelegate:self];
[self.player play];

你知道为什么会出现这种情况吗?

我已经包含了所需的框架,代码运行良好,唯一的问题是出现了这个奇怪的控制台消息。

编辑:新的奇怪消息:

AddRunningClient starting device on non-zero client count

在播放MP3时。


这是在设备上还是模拟器上? - deanWombourne
模拟器。我还没有在设备上测试过它。 - Emil
4
在设备上试用一下。设备和模拟器之间有很多不同之处。 - Aleksejs Mjaliks
我会的。你知道这个错误是什么意思吗? - Emil
这个问题已经有明确的答案了吗? - alexbw
@alex 不是的,当我更新XCode时它自己修复了。 - Emil
5个回答

2

看起来问题不在代码中,可能有多种原因导致您的问题,因此:

  1. I recommend you create a simple project in which you put the simplest audio file or run one of the apple's sample project, like Metronome or avTouch

  2. Try to uninstall XCode by writing in Terminal:

    sudo /Developer/Library/uninstall-devtools --mode=all
    

    and re-install XCode because sometimes there appear some problems in the instalation process of the XCode(I had some errors too, but they dissapeared after a clean install).

  3. Try to play the same file with MPMoviePlayerController

  4. Try to run on the iPhone.

消息“AddRunningClient在非零客户端计数上启动设备”也出现在iPhone SDK 4.0 Beta上的mpmoviePlayercontroller中,所以你不必太担心。

希望我的回答对你有帮助!


1

在苹果支持论坛上有一个相当古老的帖子,可能会提供一些明智的建议。

建议尝试在系统上运行磁盘工具,并单击“修复磁盘权限”。症状可能是由于某种原因,DVCPROHDAudio.plugin文件失去了执行模式或所有者ID已更改。


0

尝试删除或重命名插件文件,例如...plugin.old,并重新运行您的代码,看看是否仍然出现错误。


0
或者只需重新启动你的机器。奇怪的是,这对我起作用,因为它似乎只在连接到本地WiFi时发生。
是的,很奇怪。但它起了作用。

0

对我来说,make clean解决了问题...


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接