“应用程序包不包含有效标识符”。

时间:2022-04-06 10:35:15

Recently, after upgrading to Lion and Xcode 4.2.1 I am getting this error when trying to run my app on my iPhone 4S:

最近,在升级到Lion和Xcode 4.2.1之后,我在iPhone 4S上运行我的应用时出现了这个错误:

"The application bundle does not contain a valid identifier."

“应用程序包不包含有效的标识符。”

My identifier is indeed valid, and I have been able to run my app with this identifier earlier.

我的标识符确实是有效的,我可以在前面使用这个标识符运行我的应用程序。

The problem might appear when I change computers. I have two computers that I am using to code my app, and I am using Dropbox to keep track of my files.

当我换电脑时,这个问题可能会出现。我有两台电脑,我正在用它来为我的应用编程,我还在用Dropbox来跟踪我的文件。

Restarting XCode, my mac and my iPhone does not work. Cleaning the target and rebuilding does not work. The only thing I have been able to do to fix it is to create a completely new project and moving my files. This made things work until I swapped computer. Now I am in the same trouble again.

重新启动XCode,我的mac和我的iPhone不工作。清洁目标和重建是行不通的。我唯一能做的就是创建一个全新的项目并移动我的文件。直到我换了电脑,这些东西才开始工作。现在我又遇到了同样的麻烦。

Any idea? Anyone?

任何想法?有人知道吗?

1 个解决方案

#1


3  

Three suggestions:

三个建议:

  1. Check that your developer key is in both computers

    检查您的开发人员密钥是否在两台计算机中

  2. Did you try to update the project? There is a strangly-named key in the middle bottom under the project's properties. Try this.

    你试着更新这个项目了吗?在项目属性的中间底部有一个命名奇怪的键。试试这个。

  3. I had similar issues. I found that some things weren't updated when I updated osx and xcode. To get out of the situation, I would suggest creating a new project and copy paste code, files and build settings. This might seem stupid, but you know apple is not good at creating IDE's. You might just get your self lost in the undocumented settings.

    我也有类似的问题。我发现在更新osx和xcode时有些东西没有更新。为了摆脱这种情况,我建议创建一个新项目并复制粘贴代码、文件和构建设置。这看起来很愚蠢,但你知道苹果不擅长创建IDE。你可能会在无证的设置中迷失自我。

#1


3  

Three suggestions:

三个建议:

  1. Check that your developer key is in both computers

    检查您的开发人员密钥是否在两台计算机中

  2. Did you try to update the project? There is a strangly-named key in the middle bottom under the project's properties. Try this.

    你试着更新这个项目了吗?在项目属性的中间底部有一个命名奇怪的键。试试这个。

  3. I had similar issues. I found that some things weren't updated when I updated osx and xcode. To get out of the situation, I would suggest creating a new project and copy paste code, files and build settings. This might seem stupid, but you know apple is not good at creating IDE's. You might just get your self lost in the undocumented settings.

    我也有类似的问题。我发现在更新osx和xcode时有些东西没有更新。为了摆脱这种情况,我建议创建一个新项目并复制粘贴代码、文件和构建设置。这看起来很愚蠢,但你知道苹果不擅长创建IDE。你可能会在无证的设置中迷失自我。