2015-08-20 46 views
2

動機:使用本地化的xib創建庫。Pod安裝警告:是多個組的成員

我改變了我的Podspec到:

s.name   = "MyLibrary" 
    s.version  = "0.0.1" 
    s.summary  = "A short description of MyLibrary." 
    s.license  = "MIT (example)" 

    s.author    = { "" => "" } 
    s.source_files = "MyLibrary", "MyLibrary/**/*.{h,m,mm,cpp}" 
    s.exclude_files = "Classes/Exclude" 

    s.resources = "MyLibrary/**/**/*.{png, lproj}" 

    #CHANGE THAT MADE ================> 
    s.ios.resource_bundle = { 'CamerCaptureLibBundle-iOS' => ['**/**/*.lproj'] } 

    s.dependency "OpenCV", "~> 2.4.9.1" 
    s.dependency 'FrameAccessor' 

end 

下面這個環節的指導 - http://yannickloriot.com/2014/02/cocoapods-and-the-localized-string-files/

但是,這是給我一個警告,而安裝我的布丁作爲 -

Update all pods 
Updating local specs repositories 
Analyzing dependencies 
Fetching podspec for `MyLibrary` from `../MyLibrary` 
Downloading dependencies 
Using AFNetworking (2.6.0) 
Using CHTCollectionViewWaterfallLayout (0.9.2) 
Installing MyLibrary 0.0.1 (was 0.0.1) 
Using CorePlot (1.6) 
Using FrameAccessor (2.0) 
Using HKCircularProgressView (1.1.0) 
Using OpenCV (2.4.9.2) 
Using ViewDeck (2.3.1) 
Generating Pods project 
2015-08-20 15:31:39.478 ruby[31394:8637187] warning: The file reference for 

"Base.lproj" 
is a member of multiple groups ("Capture" and "Slideshow"); this indicates a malformed 
project. Only the membership in one of the groups will be preserved (but membership 
in targets will be unaffected). If you want a reference to the same file in more than 
one group, please add another reference to the same path. 
2015-08-20 15:31:39.479 ruby[31394:8637187] warning: The file reference for "de.lproj" 
is a member of multiple groups ("Capture" and "Slideshow"); this indicates a malformed 
project. Only the membership in one of the groups will be preserved (but membership in 
targets will be unaffected). If you want a reference to the same file in more than one 
group, please add another reference to the same path. 
2015-08-20 15:31:39.479 ruby[31394:8637187] warning: The file reference for "en.lproj" is 
a member of multiple groups ("Capture" and "Slideshow"); this indicates a malformed project. 
Only the membership in one of the groups will be preserved (but membership in targets will 
be unaffected). If you want a reference to the same file in more than one group, please 
add another reference to the same path. 
Integrating client project 
Sending stats 

我需要什麼

  1. 如何處理這個錯誤?
  2. 如何使用具有本地化xib的pod,以便在安裝我的源和資源時它們應該採用相同的格式...?
+0

你解決了你的錯誤嗎? – Loegic

+0

是的,錯誤由Loegic的答案解決。但我的第二個問題仍然是一個謎。 –

+0

好吧,您也可以爲答案提出問題,對於這個問題,您能否詳細介紹一下「他們應該使用相同的格式」 – Loegic

回答

-2

要導入的Base.lproj兩次:在 s.resources = "MyLibrary/**/**/*.{png, lproj}"s.ios.resource_bundle = { 'CamerCaptureLibBundle-iOS' => ['**/**/*.lproj'] }

你必須改變s.resources進口排除Base.lproj文件。

+0

這不起作用... –

+0

如果您的項目只與iOS兼容,則不必指定s.ios.ressource。你得到的錯誤是因爲你導入lproj兩次,在這種情況下完全刪除行s.ios.ressouvre – Loegic

+0

仍然不適合我。 – manonthemoon