简体   繁体   English

Xcode 5.1中的MPMusicPlayerController链接器错误

[英]MPMusicPlayerController linker error in Xcode 5.1

My media player app was compiling fine and working seamlessly in older versions. 我的媒体播放器应用程序可以正常编译,并且可以在旧版本中无缝运行。 I upgraded my Xcode and i get the following errors 我升级了Xcode,并遇到以下错误

Undefined symbols for architecture armv7: 架构armv7的未定义符号:
"_OBJC_CLASS_$_MPMusicPlayerController", referenced from: 从以下位置引用的“ _OBJC_CLASS _ $ _ MPMusicPlayerController”
objc-class-ref in libvolumectrl_r.a(PlayerVolumeControl.o) libvolumectrl_r.a(PlayerVolumeControl.o)中的objc-class-ref
ld: symbol(s) not found for architecture armv7 ld:找不到架构armv7的符号
clang: error: linker command failed with exit code 1 (use -v to see invocation) clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

I have tried the following based on my previous solutions search 我已经根据以前的解决方案搜索尝试过以下方法

  1. Added MediaPlayer.framework in build phase link libraries 在构建阶段链接库中添加了MediaPlayer.framework
  2. included following imports in my source files 在我的源文件中包含以下导入

#import <MediaPlayer/MediaPlayer.h>
#import <MediaPlayer/MPMusicPlayerController.h>

i am still unable to compile. 我仍然无法编译。 Please let me know if there are any other missing steps 如果还有其他遗漏步骤,请告知我

Go to the Build Settings -> Valid Architectures -> remove armv7 Architecture. 转到构建设置->有效架构->删除armv7架构。 Only arm64 in Architecture. 在架构中只有arm64。 Then clean application and build it.No any linker error come. 然后清理应用程序并构建它,不会出现任何链接器错误。 Please follow this steps. 请按照以下步骤操作。 Regards, Kinjal 问候,金贾尔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM