ios – 当我打开在Xcode 4中创建的Google Maps项目时,Xcode 5会警告我的架构设置

ios – 当我打开在Xcode 4中创建的Google Maps项目时,Xcode 5会警告我的架构设置,第1张

概述我刚刚更新到新发布的 Xcode 5.我正在开发一个使用Google Maps iOS SDK的iOS应用程序.回到我在Xcode 4中开发时,我根据Google instructions for adding the SDK to the project的第7步更改了我的项目设置中的Architectures设置: 7. Choose your project, rather than a sp 我刚刚更新到新发布的 Xcode 5.我正在开发一个使用Google Maps iOS SDK的iOS应用程序.回到我在Xcode 4中开发时,我根据Google instructions for adding the SDK to the project的第7步更改了我的项目设置中的Architectures设置:

7. Choose your project,rather than a specific target,and open the Build Settings tab.
Replace the default value of Architectures with armv7.
In the Other linker Flags section,add -ObjC. If these settings are not visible,change the filter in the Build Settings bar from Basic to All.

在Xcode 4中一切都很好.但是,当我在Xcode 5中打开我的项目时,我在问题导航器中看到以下警告

ValIDate Project Settings

Update to recommended settings

当我点击警告时,Xcode将我带到我的项目设置并显示一个带有“取消”和“执行更改”按钮的d出窗口,以及它要进行的更改的以下描述

Project ‘Your Project’ – automatically Select Architectures

Project ‘Your Project’ overrIDes the Architectures setting. This will remove the settings and allow Xcode to automatically select Architectures based on harDWare available for the active platform and deployment target.

我尝试点击“执行更改”并让Xcode做任何想做的事情,而且应用程序仍然适用于模拟器.但是,当我尝试插入iPhone 5(支持ARMv7S)并在其上运行时,应用程序无法使用以下链接器错误构建:

Ld /Users/macmini/library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/DeBUG-iphoneos/Your\ App.app/Your\ App normal armv7s    cd "/Users/macmini/documents/Your App"    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/macmini/library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/DeBUG-iphoneos -F/Users/macmini/library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/DeBUG-iphoneos -F/Users/macmini/documents/Your\ App -fileList /Users/macmini/library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Intermediates/Your\ App.build/DeBUG-iphoneos/Your\ App.build/Objects-normal/armv7s/Your\ App.linkfileList -dead_strip -ObjC -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework SystemConfiguration -framework MapKit -framework QuartzCore -framework OpenGLES -lz -licucore -lc++ -framework ImageIO -framework GLKit -framework CoreText -framework CoreLocation -framework AVFoundation -framework CoreData -framework UIKit -framework Foundation -framework CoreGraphics -framework GoogleMaps -Xlinker -dependency_info -Xlinker /Users/macmini/library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Intermediates/Your\ App.build/DeBUG-iphoneos/Your\ App.build/Objects-normal/armv7s/Your\ App_dependency_info.dat -o /Users/macmini/library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/DeBUG-iphoneos/Your\ App.app/Your\ Appld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/macmini/documents/Your App/GoogleMaps.framework/GoogleMaps file '/Users/macmini/documents/Your App/GoogleMaps.framework/GoogleMaps' for architecture armv7sclang: error: linker command Failed with exit code 1 (use -v to see invocation)

一旦我恢复了Xcode所做的自动更改,我的应用程序再次为iPhone 5编译好了 – 但当然我收到了警告.

我怎样才能满足Xcode并摆脱警告,同时仍允许我的应用程序为iPhone 5成功构建?

解决方法 哎呀 – 因为它发生了这个问题,我发现这个问题后我只花了几秒钟的时间来找到答案:

>单击问题导航器中的“验证项目设置”警告.
>取消选中“自动选择架构”建议更改左侧的复选框.
>如果列表中还有其他更改,则单击“完成”(或“执行更改” – 在我的情况下,这是唯一的更改).

现在您的设置与以前一样,您可以为iPhone 5构建,但警告消失了.

我花了很多时间发布这个问题,现在感觉有些暗淡,但是我在这里留下问题和答案,以防将来有人帮助.

总结

以上是内存溢出为你收集整理的ios – 当我打开在Xcode 4中创建的Google Maps项目时,Xcode 5会警告我的架构设置全部内容,希望文章能够帮你解决ios – 当我打开在Xcode 4中创建的Google Maps项目时,Xcode 5会警告我的架构设置所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1002563.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存