ios 在设备上启动应用程序时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4840606/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error while launching the application on device
提问by Abhinav
I am getting this error while launching the application on device:
在设备上启动应用程序时出现此错误:
Error launching remote program: No such file or directory (/private/var/mobile/Applications/3E6A33F8-52EE-4A0B-AB9F-A122B7C42045/Test.app/Test)
回答by Aurum Aquila
First try restarting Xcode. If it doesn't work, then try hard reset of your device. This happens to me when I change the bundle identifier of my app.
首先尝试重新启动Xcode。如果它不起作用,请尝试硬重置您的设备。当我更改应用程序的包标识符时,会发生这种情况。
回答by Amnysia
With XCode 5 beta, an Hard reset of the device was needed to solve the problem.
在 XCode 5 beta 中,需要对设备进行硬重置才能解决问题。
回答by Gal
What finally fixed it for me was restarting the device (after doing everything else everyone recommends here, here Xcode 4 Error: Error Starting Executablehere Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.."and here Xcode Developer Preview: Cannot Run on Device
最终为我修复的是重新启动设备(在完成每个人在这里推荐的所有其他操作之后,这里是Xcode 4 Error: Error Running Executablehere Xcode 突然停止在硬件上运行项目:“无法启动 xxx.app:.. 没有这样的文件。 .”和这里的Xcode 开发者预览版:无法在设备上运行
回答by Faisal Memon
If just restarting Xcode and the iPhone does not help, look at your provisioning profiles. Shift-Command-2 brings it up from within Xcode. You can then select the device and then provisioning profiles within that. Deleting your profiles (mine had numerous similar-looking entries created by Xcode) and then restarting Xcode and the iPhone clears the problem.
如果只是重新启动 Xcode 并且 iPhone 没有帮助,请查看您的配置文件。Shift-Command-2 从 Xcode 中调出它。然后,您可以选择设备,然后在其中配置配置文件。删除您的配置文件(我的配置文件中有许多由 Xcode 创建的类似条目),然后重新启动 Xcode,iPhone 可以解决问题。
If your app is a background app you will need to manually delete the app before deploying the new version. For example, say you've an iBeacon aware app, and mark yourself as a background consumer of Bluetooth Low Energy then the OS keeps some record of your app even when it is not running. This record is not properly cleared out when a new version is deployed (iOS 7.0.4). That will cause the reported error, as well as hang the debug and deployment protocol to the handset. The handset will need a restart.
如果您的应用程序是后台应用程序,您将需要在部署新版本之前手动删除该应用程序。例如,假设您有一个 iBeacon 感知应用程序,并将自己标记为低功耗蓝牙的后台消费者,那么即使您的应用程序未运行,操作系统也会保留一些记录。部署新版本 (iOS 7.0.4) 时,此记录未正确清除。这将导致报告的错误,以及将调试和部署协议挂在手机上。手机需要重启。
A hack to sidestep the problem is to change the bundle id of your app to something that the phone has not seen. Then it deploys to the handset as a newly seen app avoiding problems from references to the old app.
绕过这个问题的一个技巧是将您的应用程序的包 ID 更改为手机没有看到的内容。然后它作为一个新看到的应用程序部署到手机上,避免了引用旧应用程序的问题。
回答by Ahtazaz
What finally fixed for me was CLEANING(Command + Shift + K) the Xcode project...
最终为我修复的是CLEANING(Command + Shift + K) Xcode 项目...
回答by Ian Kershaw
This can also be caused by trying to deploy a target to a device which is not supported e.g. iPad app to iPhone. I got this cryptic message when I forgot to switch it to Universal app.
这也可能是由于尝试将目标部署到不受支持的设备(例如 iPad 应用程序到 iPhone)而导致的。当我忘记将其切换到通用应用程序时,我收到了这条神秘消息。
回答by Martin
It also happen when your Deployment Target is higher than your Device.
当您的部署目标高于您的设备时,也会发生这种情况。
Lower it and it may work.
降低它,它可能会起作用。
(thanks to Ian Kershaw, whose made me look around this field)
(感谢 Ian Kershaw,他让我环顾了这个领域)