开发者

What is pt.lproj?

开发者 https://www.devze.com 2023-04-11 19:38 出处:网络
In Xcode 4, I\'m getting this error: /Developer/Projects/MyApp/Classes/pt.lp开发者_开发技巧roj/Localizable.strings:0: error: The file “Localizable.strings” couldn’t be opened because there is no s

In Xcode 4, I'm getting this error:

/Developer/Projects/MyApp/Classes/pt.lp开发者_开发技巧roj/Localizable.strings:0: error: The file “Localizable.strings” couldn’t be opened because there is no such file.

"pt" isn't a language I've used in the app. I do have several languages that utilize xx.lproj folders but "pt" isn't one of them. Any ideas what is causing this?

EDIT:

I do see a Portuguese Localizable.strings file under the main Localizable.strings. It is red and I can't delete it.


If Xcode really gets itself into a state then the nuclear option is to right click on your .xcodeproj and select 'Show Package Contents'. Then open the .pbxproj file in there in a text editor such as TextEdit — it's a use readable file with a JSON-like format. Look through there and remove any references to the mysterious pt.lproj. Be sure to back up your .xcodeproj first, as if you leave the .pbxproj in an invalid state then Xcode will simply refuse to reopen the project.


The file “Localizable.strings” couldn’t be opened because there is no such file.

I met this issue just now and finally solved it by:

  1. Remove References of Localizable.strings from your project (NOT Delete);
  2. Add Localizable.strings to "Supporting Files" again by AltCmda. (Localizable.strings files can be find in <country_code>.lproj, they'll be combined automatically).

P.S. It not answers OP's question directly, but it might be help for someone else meet this error. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消