简体   繁体   English

错误 MT0117:无法在仅支持 64 位应用程序的模拟器上启动 32 位应用程序 (iPhone 6s)

[英]error MT0117: Can't launch a 32-bit app on a simulator that only supports 64-bit apps (iPhone 6s)

Using Xamarin.Forms, Visual Studio 2017 on a PC, and MacBook Air for building the mobile application to iOS.在 PC 上使用 Xamarin.Forms、Visual Studio 2017 和 MacBook Air 将移动应用程序构建到 iOS。

Yesterday, I updated the Visual Studio version to 15.3.5.昨天,我将 Visual Studio 版本更新为 15.3.5。 I also updated the MacBook Air (via VS for Mac) to get the latest version of iOS (11.0).我还更新了 MacBook Air(通过 VS for Mac)以获取最新版本的 iOS (11.0)。 I created a new app (Xamarin.Forms) just to test the update and everything worked as expected.我创建了一个新应用程序 (Xamarin.Forms) 只是为了测试更新,一切都按预期工作。

I tried to run an older app that I was developing previously, and I wasn't able to run it on the Mac.我尝试运行我之前开发的旧应用程序,但无法在 Mac 上运行它。

I got the following error:我收到以下错误:

Launch failed. The app 'AppName.iOS' could not be launched on 'iPhone 6s iOS 11.0'. 
Error: error MT0117: Can't launch a 32-bit app on a simulator that only supports 64-bit apps (iPhone 6s). Please check the logs for more details.
The app has been terminated.

Next, I plugged in a device (iPhone) to the Mac and tried to run the application to the device.接下来,我将设备 (iPhone) 插入 Mac 并尝试在该设备上运行应用程序。 I was able to run the application, but I got a message notifying me that the application will stop running as soon as I update the iOS of the Device (I didn't update the iOS on the device).我能够运行该应用程序,但收到一条消息,通知我更新设备的 iOS 后应用程序将停止运行(我没有更新设备上的 iOS)。

So, the question is how do I solve the problem?那么,问题是我该如何解决这个问题? Does this has something to do with my application, or the packages that I'm using?这与我的应用程序或我正在使用的软件包有关吗? Is there a setting that I need to set?是否有我需要设置的设置? Is it possible to run an old simulator on the Mac?是否可以在 Mac 上运行旧模拟器?

If you change the support architectures to "i386 + x86_64" or "x86_64", it should solve your problem.如果您将支持架构更改为“i386 + x86_64”或“x86_64”,它应该可以解决您的问题。

You can right click your project -> properties -> iOS build -> change "Supported Architectures" to "i386 + x86_64" or "x86_64"您可以右键单击您的项目 -> 属性 -> iOS 构建 -> 将“支持的架构”更改为“i386 + x86_64”或“x86_64”

With Xcode 9 it should be possible to install simulators back as far as iOS 8.1 - a least that's what the "Components" tab says in the Xcode preferences.使用 Xcode 9,应该可以将模拟器安装回 iOS 8.1 - 至少这是 Xcode 首选项中的“组件”选项卡所说的。

I don't use the simulators regularly since at my company we have a couple of test devices with all our supported iOS versions and i trust testing on actual hardware more than testing on simulators.我不经常使用模拟器,因为在我的公司,我们有几个测试设备支持所有 iOS 版本,我相信在实际硬件上进行测试比在模拟器上测试更重要。

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

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