English 中文(简体)
iPhone/iPod Touch: application executable is missing a required architecture
原标题:

I have an issue with xCode 4.2. I am getting this error when building:

2011-06-18 13:35:49.839 Validation[4110:607] *** Warning: Defaulting to the standard codesign tool
warning: iPhone/iPod Touch: application executable is missing a required architecture.  At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)

I had a look at my project settings, and it has :

architectures: Standard (arm7) - ${ARCHS_STANDARD_32_BIT)
Build active architecture only : NO

Not sure what

问题回答

For some reason the default architecture settings with xCode 4.2 is only for armv7. Go to Target -> Build Settings -> Architectures -> Release on value dropdown pick "Other...",

remove $(ARCHS_STANDARD_32_BIT), and add 2 rows first with "armv6" and second "armv7"
Done

For Xcode 4.5, set the deployment target to at least iOS 4.3 and that will resolve it. Earlier versions of iOS are almost extinct.

Not the optimal solution, but I found that if I changed the Deployment Target to 4.3 (it was 4.0 before) it gets rid of the error.

For XCode 4.5

Had to set "Deployment Target" to 4.3, "Architectures" to armv6 armv7 armv7s as described above, AND "Build Active Architectures Only" to No.

This on a project that worked fine for several month before upgrading to XCode 4.5.

Note: Set the iOS Deployment Target to 4.3 or later in your project if you wish to drop ARM v6 support for your application. An ARM v7 processor is required to run versions of iOS later than 4.2.1.

My previous answer was deleted by the moderator because I didn t comply with their rules. So, answering again.

I faced the same issue and wasted 2 days on it. In my case an upgrade to XCode caused it. I downgraded XCode to the previous version and it got fixed for me. If this is your issue then uninstall new version, reboot and then install old version again. That should do it for you.

I have also added some screenshots and info to my blog about this issue here: http://iostipsntricks.wordpress.com/2011/06/24/solved-application-executable-is-missing-a-required-architecture-at-least-one-of-the-following-architectures-must-be-present-armv6/

Had absolutely the same problem with Xcode Version 4.2. and got also an other error:

There is no codesign:wrapper executable. Please reinstall the Xcode developer tools.

After downgrading the Xcode to an older version it fixed the problem.

Check this post, it is the right one with just adjust a setting in Xcode 4.2, just set "Build Active Architecture only" to NO:

iTunes Connect application is missing required architecture

My Answer may be solve your problem: I had this problem even after following the accepted answer and found the following to work:

In your Info.plist, add an entry for Required Device Capabilities. This should be an array and will have two entries.

Item 0 : armv6
Item 1 : armv7

It will look like this:

Required device capabilities entry

Had the same problem, tried everything mentioned here - but still got the error on validate - I tried armv6 and armv7 steps, tried to add that to info.plist and also tried regenerating the distribution certificate just in case.

Turns out the info.plist file must have ${EXECUTABLE_NAME} and ${PRODUCT_NAME} in the respective fields ALSO the Product name in the Build Settings for that scheme+Target SHOULD match the scheme name I made sure all the names matched exactly EXECUTABLE_NAME, PRODUCT_NAME, Product Name in Target, binary name in build settings and info plist, and the deployable binary name - made sure they matched the Target name itself

Once all the names matched and the architecture matched, it worked. Until then it kept giving me error on validation.





相关问题
Asynchronous request to the server from background thread

I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

iPhone numberpad with decimal point

I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...

热门标签