我已经构建了一个xamarin应用程序,并在android模拟器上对其进行了测试,该应用程序运行良好。我已经决定在iOS模拟器上测试它,但它并没有按计划进行。我已经将我的windows pc连接到MacBook专业版,将Visual Studio2019和xCode更新到最新版本,并设置了自动配置。当我尝试在iOS14.5版本上启动该应用程序时,无论哪个iPhone都不重要,我收到以下错误:
error HE0046: Failed to install the app 'packageName' on the device 'iOS 14.5 (18E182) - iPhone 12': ???appName??? Needs To Be Updated 我已经在谷歌上搜索过了,但没有成功。我曾尝试在较旧的iOS版本上启动该应用程序,但收到另一个错误:
error HE0042: Could not launch the app 'packageName' on the device 'iOS 13.0 (17A577) - iPhone 8': The request to open "appName" failed.我已经检查了macBook模拟器上的日志,但我仍然无法解决我的问题。
来自iPhone 8 iOS 13.0模拟器的日志:
Jul 1 16:02:11 Borjans-MBP com.apple.CoreSimulator.SimDevice.7E33AFBE-858C-4EBD-9470-8E503EAA0B21[18503] (UIKitApplication:packageName[82f8][rb-legacy][38282]): Could not find and/or execute program specified by service: 86: Bad CPU type in executable: /Users/borjan/Library/Developer/CoreSimulator/Devices/7E33AFBE-858C-4EBD-9470-8E503EAA0B21/data/Containers/Bundle/Application/B178901C-355F-4956-9EA0-296A2CEB1718/projectName.iOS.app/projectName.iOS
Jul 1 16:02:11 Borjans-MBP com.apple.CoreSimulator.SimDevice.7E33AFBE-858C-4EBD-9470-8E503EAA0B21[18503] (UIKitApplication:bundleName[82f8][rb-legacy][38282]): Service setup event to handle failure and will not launch until it fires.
Jul 1 16:02:11 Borjans-MBP com.apple.CoreSimulator.SimDevice.7E33AFBE-858C-4EBD-9470-8E503EAA0B21[18503] (UIKitApplication:bundleName[82f8][rb-legacy][38282]): Service exited with abnormal code: 78
Jul 1 16:02:59 Borjans-MBP syslogd[18505]: ASL Sender Statistics我花了几天时间寻找解决方案,但没有找到。有人能帮帮我吗?
发布于 2021-07-05 18:08:32
我终于找到问题所在了。当我单击run按钮时,它以某种方式将配置从iPhoneSimulator更改为iPhone。我应该手动将配置设置为iPhoneSimulator,它现在起作用了。只需转到配置管理器,找到iOS项目,并将平台设置为iPhoneSimulator而不是iPhone。
https://stackoverflow.com/questions/68212012
复制相似问题