运行 UITest 无法在 iphone 4s 模拟器上使用 xcode 9

Can't run UITest on iphone 4s simulator with xcode 9

项目可以在 iphone 4s 模拟器上正确构建,但尝试 运行 UITest 时出现错误:

The bundle “MyappUITests” couldn’t be loaded because it doesn’t contain a version for the current architecture. Try installing a universal version of the bundle.

似乎无法找出根本原因,测试 运行在所有其他模拟器上都正常。

有什么想法吗?

我已经解决了这个问题,将 UITest 目标的 "iOS Deployment Target" 设置为 iOS 9.0。它由 Xcode.

以 11.1 值创建

我在尝试将新的 M1 Macbook Pro 用于 运行 XCUITests 时遇到此错误。

我已将 Simulator SDK 的排除架构(在构建设置中)设置为 arm64,用于主要目标和 XCUITests 目标。从 XCUITests 目标中删除此排除修复了此错误。

希望这能帮助其他一些像我一样在新 M1 Macbook 上做噩梦的人...但愿我从未升级过。

根据 Charlie Seligman 的上述回答,我也遇到了问题 运行 XCUITests。能够通过在 XCode 构建设置中将“仅构建活动架构”下的所有选项设置为“否”来解决它。详情:https://github.com/appium/java-client/issues/1444#issuecomment-781078298