xcode 应用程序包不包含有效标识符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37750186/
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
The application bundle does not contain a valid identifier
提问by Lilrom
I try to run my project but i get the following error "The application bundle does not contain a valid identifier."
我尝试运行我的项目,但出现以下错误“应用程序包不包含有效标识符。”
here my info.plist
这是我的 info.plist
I followed other answer on the question. I don't have any "Ressources" folder inside my project.
我在这个问题上遵循了其他答案。我的项目中没有任何“资源”文件夹。
Thanks for your help
谢谢你的帮助
回答by Hailong
I solve this problem after I delete all build files by Xcode.
Your build file path at Xcode > Preferences > Locations > Derived Data
我在通过 Xcode 删除所有构建文件后解决了这个问题。您的构建文件路径位于Xcode > Preferences > Locations > Derived Data
If you didn't change the default path, Your path is like
如果你没有改变默认路径,你的路径就像
I just deleted all files under DerivedData
我刚刚删除了下的所有文件 DerivedData
回答by Sjakelien
In my case, this problem occurred when I manually removed a pod from my file browser in XCode. In order to fix it, I deleted the associated entry in my podfile, and ran 'pod install' from the terminal. Additionally, I had to delete the relevant search paths and other references to that pod. And of course I had to clean the project.
就我而言,当我从 XCode 的文件浏览器中手动删除一个 pod 时,就会出现这个问题。为了修复它,我删除了 podfile 中的关联条目,并从终端运行“pod install”。此外,我不得不删除相关搜索路径和对该 pod 的其他引用。当然,我必须清理这个项目。
回答by Manuel M.
In my case the info.plist
had the wrong encoding format, I still don't know why it changed. So I had to create a new one from Xcode and copy paste all the keys.
在我的情况下,info.plist
编码格式错误,我仍然不知道它为什么会改变。所以我不得不从 Xcode 创建一个新的并复制粘贴所有的键。
回答by Ankur Lahiry
Cleaning the project solves my issue. Product -> Clean
清理项目解决了我的问题。 Product -> Clean
回答by Doug Voss
I was building the wrong target on a device in my case. I was building the Test target rather than the normal app target.
就我而言,我在设备上构建了错误的目标。我正在构建测试目标而不是普通的应用程序目标。
回答by Sergey Katranuk
In my case, I've added a framework into Embed Binaries
phase, but it was already in my Link Frameworks and Binaries
phase, which created a duplicate entry. Once I deleted one of them, this error starting appearing.
就我而言,我已经在Embed Binaries
阶段中添加了一个框架,但它已经在我的Link Frameworks and Binaries
阶段中,这会创建一个重复的条目。一旦我删除了其中一个,这个错误就开始出现。
To fix it, I've removed the framework from both build phases and added it one more time
为了修复它,我从两个构建阶段中删除了框架并再次添加了它
回答by RaschidRafaelly
In my case, my app's bundle contained a dash like com.some-thing.app
so I just changed it to com.something.app
and the problem was fixed.
就我而言,我的应用程序包包含一个破折号,com.some-thing.app
所以我只是将其更改为com.something.app
,问题就解决了。
回答by cmc
For my case, it's caused by a wrong Info.plist in a framework(lack of Bundle identifier and Executable file)
就我而言,它是由框架中的错误 Info.plist 引起的(缺少 Bundle identifier 和 Executable 文件)
Use ideviceinstaller -i xx.app
can see the detailed error log.
使用ideviceinstaller -i xx.app
可以看到详细的错误日志。