ios Xcode:无法检查应用程序包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26015194/
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
Xcode: Could not inspect the application package
提问by Josh Kahane
I am running Xcode 6 and iOS 8 GM. Every other time I run my app I get this message from Xcode:
我正在运行 Xcode 6 和 iOS 8 GM。每次我运行我的应用程序时,我都会从 Xcode 收到这条消息:
"Could not inspect the application package"
“无法检查应用程序包”
So I can run and build, I will get the message. I run and build again, everything runs as expected (this is to my device). Then it will rinse and repeat, every other time giving me this error.
所以我可以运行和构建,我会收到消息。我再次运行并构建,一切都按预期运行(这是我的设备)。然后它会冲洗并重复,每隔一次给我这个错误。
I have looked at all the other solutions that have been suggested but cannot stop this error. I have cleaned my project, cleaned the build folder, deleted derived data etc with no luck.
我已经查看了所有其他建议的解决方案,但无法阻止此错误。我已经清理了我的项目,清理了构建文件夹,删除了派生数据等,但没有运气。
How can I see what is causing this in the first place?
我怎么能首先看到是什么导致了这种情况?
Interestingly, this only happens when running on my device. Not on the simulator. Also, it only happens on my device, when building for debug. If I change the scheme to release, I can build and run endlessly without with error. Ideas?
有趣的是,这只发生在我的设备上运行时。不在模拟器上。此外,它只发生在我的设备上,在为调试而构建时。如果我将方案更改为发布,我可以无休止地构建和运行而不会出错。想法?
采纳答案by borisgolovnev
This can happen with Xcode 6 and iOS 8 if a product name contains non-latin characters. In this case changing product name to the one with only latin characters for debug builds fixes this problem.
如果产品名称包含非拉丁字符,则 Xcode 6 和 iOS 8 可能会发生这种情况。在这种情况下,将产品名称更改为仅包含用于调试版本的拉丁字符的产品名称可以解决此问题。
回答by Marcos Curvello
回答by Roney Francis
Try to remove some libraries from your Xcode => Click on Target => General tab => Embedded Libraries(Keep only required libraries or Framework)
Here, remove (Use - sign on bottom to delete).
If you require the framework or libraries that you deleted, add this using Xcode => Click on Target => General tab => Linked framework and Libraries(Use - sign on bottom to add this).
尝试从Xcode 中删除一些库=> 单击目标 => 常规选项卡 => 嵌入式库(仅保留必需的库或框架)
在这里,删除(使用 - 在底部签名以删除)。
如果您需要删除的框架或库,请使用Xcode添加它=> 单击目标 => 常规选项卡 => 链接的框架和库(使用 - 在底部签名以添加它)。
This will work.
这将起作用。
回答by picciano
If you have moved or copied a folder named resources
or resource
into your project, try renaming it. Then perform a clean
.
如果您已将名为resources
或的文件夹移动或复制resource
到您的项目中,请尝试重命名它。然后执行一个clean
.
回答by Daniel Molina
In my case, I needed to check the option that says "Copy only when installing" under "Build Phases/Embed Frameworks" in one of the frameworks I was embedding.
就我而言,我需要在我嵌入的框架之一中的“构建阶段/嵌入框架”下选中“仅在安装时复制”选项。
回答by Yannick
I deleted my Info.plist
and I dragged a new info.plist
into my project. Xcode did not show me any warning but my app would not launch until i changed the name to Info.plist
.
我删除了我的,Info.plist
然后将一个新的info.plist
拖到我的项目中。Xcode 没有向我显示任何警告,但在我将名称更改为Info.plist
.
回答by Lewis Hotchen
Found a solution by adding the Framework to General -> Linked Frameworks And Libraries and setting the status to optional. (Leave the embedded binaries blank)
通过将框架添加到 General -> Linked Frameworks And Libraries 并将状态设置为 optional 找到了解决方案。(将嵌入的二进制文件留空)
回答by Dan Field
I got this when a custom built .framework was missing its Info.plist.
当自定义构建的 .framework 缺少其 Info.plist 时,我得到了这个。
回答by earltedly
I've seen this error before when there is something in the entitlements file but is not enabled for the app id in the provisioning centre.
当权利文件中有内容但未在配置中心为应用程序 ID 启用时,我曾见过此错误。
Specifically I had HealthKit enabled in the entitlements file but not configured for the application identifier.
具体来说,我在权利文件中启用了 HealthKit,但没有为应用程序标识符配置。
回答by Faisal Memon
I had a potentially similar problem, hardware only, when I had an app which was given entitlement to run in the background and had run previously on the phone. For such apps, I found the Xcode deployment to phone broken and had to change the bundle identifier to unjam the deployment.
当我有一个应用程序有权在后台运行并且以前在手机上运行时,我遇到了一个潜在的类似问题,仅限于硬件。对于这样的应用程序,我发现 Xcode 部署到手机坏了,不得不更改包标识符来解除部署的阻塞。