EXC_BAD_ACCESS,代码 1,iOS 7.0.x 64 位设备 [英] EXC_BAD_ACCESS, code 1, iOS 7.0.x 64bit devices

查看:64
本文介绍了EXC_BAD_ACCESS,代码 1,iOS 7.0.x 64 位设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发的应用程序在模拟器上运行良好,但自从 Xcode 升级到 5.1 后,我在设备上运行应用程序时出现问题.如果我在任何 iOS 上的任何非 64 位设备上运行应用程序,它运行良好,但如果我在 64 位设备(iPhone 5s、iPad Air)上运行它,在 iOS 7.0.x 上应用程序崩溃并出现错误:

App that I am currently developing is running perfectly on simulator, but since Xcode upgrade to 5.1 I have problem running app on devices. If I run app on any non 64 bit device on any iOS it runs fine, but if I run it on 64bit device (iPhone 5s, iPad Air), on iOS 7.0.x app crashes with error:

Thread 1: EXC_BAD_ACCESS (code=1, address=0x50111f87261d1146)

line 16 main.m

@autoreleasepool {
        return UIApplicationMain(argc, argv, NSStringFromClass([MobileUIApplication class]), NSStringFromClass([AppDelegate class]));
}

如果我在装有 iOS 7.1 的 64 位设备上运行该应用程序,它运行良好.我认为问题出在我的 Target->Architectures 中,它设置了Base SDK - 最新 iOS (iOS 7.1)",但我无法将其更改为任何早期版本.我的 iOS 部署目标设置为 iOS 6.0.有没有人知道任何解决方案?我不想发布它并遇到有人使用 iOS 7.0.3 并且手机上的应用程序崩溃的情况.

If I run the app on 64bit device with iOS 7.1, it runs fine. I believe that issue is with my Target->Architectures where it is setup "Base SDK - Latest iOS (iOS 7.1)", but I cannot change that to any earler version. And my iOS Deployment Target is setup to iOS 6.0. Does anybody know any solution for this? I don't want to publish it and come into situation where person has iOS 7.0.3 and app crashes on his phone.

推荐答案

我遇到了类似的问题.当您更新 Xcode 时,可能会出现验证项目设置"的警告.当你这样做时,有一个复选框可以自动选择架构".这就是我的问题所在.

I had similar problem. When you updated Xcode there was probably warning to "Validate Project setting". When you did that, there was checkbox to automatically select "Architectures". And this is where my problem lay.

要修复它,将项目和目标的构建设置中的架构"和有效架构"更改为armv7 armv7s"(现在您可能选择了标准架构) 并将仅构建活动架构"设置为否.

To fix it change "Architectures" and "Valid Architectures" in build settings for Project AND Target to "armv7 armv7s" (right now you probably have selected Standard architectures) and set "Build Active Architectures only" to NO.

这篇关于EXC_BAD_ACCESS,代码 1,iOS 7.0.x 64 位设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆