缺少文件中所需的架构armv7?

Pop*_*eye 23 iphone objective-c xcode4

我一直收到这个警告,任何人都可以提供错

    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms       /iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/SystemConfiguration, missing required architecture armv7 in file
    Undefined symbols for architecture armv7:
    "_SCNetworkReachabilityCreateWithAddress", referenced from:
  +[Reachability reachabilityWithAddress:] in Reachability.o
   "_SCNetworkReachabilityCreateWithName", referenced from:
  +[Reachability reachabilityWithHostName:] in Reachability.o
   "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
  -[Reachability stopNotifier] in Reachability.o
   "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
  -[Reachability startNotifier] in Reachability.o
   "_SCNetworkReachabilitySetCallback", referenced from:
  -[Reachability startNotifier] in Reachability.o
   "_SCNetworkReachabilityGetFlags", referenced from:
  -[Reachability connectionRequired] in Reachability.o
  -[Reachability currentReachabilityStatus] in Reachability.o
   ld: symbol(s) not found for architecture armv7
   clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我的应用程序在模拟器中运行良好我没有得到这个就是我建立到手机时.

Sea*_* D. 59

您需要链接SystemConfiguration框架.在Xcode的项目导航器中选择项目,选择您的应用目标,然后选择Build Phases选项卡.在Link Binary With Libraries下,单击"+"按钮并选择SystemConfiguration.framework.

您可能需要以相同的方式添加其他框架依赖项,但添加SystemConfiguration是为我修复相同的错误.

ETA:我直接跳到了错误,没有看到粘贴顶部的ld警告.如果您已经链接到SystemConfiguration,可能尝试删除并重新添加它,如果所有其他方法都失败,请更新Xcode.最新版本肯定有正确的架构,所以听起来我要么你的项目看错了地方或者框架本身出了什么问题.


Mar*_*rný 6

当我包括一个使用迦太基构建的框架并将它的部署目标设置为iOS 11,但我是为iOS 9构建的时,发生了我的事。因此缺少了32位架构(armv7,i386)。我已将该框架的部署目标更改为iOS 9,并解决了我的问题。