2014-01-09 54 views
2

好吧我知道這個問題已經被問過。但通常的解決方案是標記「複製到工作區」複選框。 (我認爲這對我來說甚至都不是一種選擇,因爲即使我這樣做,我也會遇到同樣的問題)。如何從git子模塊安裝Google Play服務庫

I keep getting the red cross

但是,這是不是一個真正的好的解決方案給我,因爲我加了圖書館在我的git倉庫的子模塊,通常切換電腦,同時開發(工作和家庭)。我希望該項目將其作爲主項目中的圖書館項目進行參考。

我不能相信這是做不到的。但我已經嘗試了很多組合,而且我幾乎放棄了。

有趣的是,只要我在「屬性」面板的「Android」部分中將其引用爲項目,它就會顯示一個綠色的複選標記。但是,只要我關閉面板,然後再次打開它,我得到了紅色的十字.. WTF!?

+0

@Billthon你是怎麼解決這個問題? – ruX

回答

0
Add the Google Play Services project into your Eclipse workspace. 

Click File -> Import..., select Android -> Existing Android Code into Workspace 
Browse to and select <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib 

To add the dependency to Google Play Services into your project 

Project -> Properties -> Android -> Library, Add -> google-play-services_lib 

,甚至和參考this

+1

好的這個作品。我遇到的問題是我不想將項目複製到工作區。在意識到問題不僅發生在谷歌播放服務庫之後,我關閉了這兩個項目並重新啓動了eclipse。現在它工作,去圖。無論如何,我會接受你的答案,因爲它仍然是一個好的答案。 – Bilthon

相關問題