我想在一個項目中使用標題中提到的庫。有沒有辦法在一個項目中使用Roboguice和ActionbarSherlock?
但是,兩者都需要我的活動來擴展一個特殊的Activity類:對於Roboguice而言,它是RoboAcitivity,它是用於ActionbarSherlock的FragmentActivity。
ActionbarSherlock擴展兼容性庫,這是很好的,因爲我還需要使用片段和項目級別s < API級別11
有沒有人成功地做到了這一點?由於Java不支持多重繼承(通常這是一件好事),我試圖在ActionbarSherlock項目中使FragmentActivity擴展RoboActivity而不是標準的Activity。但我無法通過這種方式進行編譯。控制檯輸出的
部分是:
[2011-10-15 17:46:31 - RetainFragmentTest2] /Users/scythe/JavaLibs/JakeWharton-ActionBarSherlock-a4855d0/library/res/values-v11/abs__styles.xml:170: error: Error: No resource found that matches the given name: attr 'android:logo'.
[2011-10-15 17:46:31 - RetainFragmentTest2] /Users/scythe/JavaLibs/JakeWharton-ActionBarSherlock-a4855d0/library/res/values-v11/abs__styles.xml:171: error: Error: No resource found that matches the given name: attr 'android:navigationMode'.
[2011-10-15 17:46:31 - RetainFragmentTest2] /Users/scythe/JavaLibs/JakeWharton-ActionBarSherlock-a4855d0/library/res/values-v11/abs__styles.xml:174: error: Error: No resource found that matches the given name: attr 'android:progressBarPadding'.
[2011-10-15 17:46:31 - RetainFragmentTest2] /Users/scythe/JavaLibs/JakeWharton-ActionBarSherlock-a4855d0/library/res/values-v11/abs__styles.xml:176: error: Error: No resource found that matches the given name: attr 'android:subtitle'.
[2011-10-15 17:46:31 - RetainFragmentTest2] /Users/scythe/JavaLibs/JakeWharton-ActionBarSherlock-a4855d0/library/res/values-v11/abs__styles.xml:177: error: Error: No resource found that matches the given name: attr 'android:subtitleTextStyle'.
[2011-10-15 17:46:31 - RetainFragmentTest2] /Users/scythe/JavaLibs/JakeWharton-ActionBarSherlock-a4855d0/library/res/values-v11/abs__styles.xml:173: error: Error: No resource found that matches the given name: attr 'android:titleTextStyle'.
你太貪婪我認爲:P 但我覺得你的問題是因爲abs_styles沒有提及的屬性 – the100rabh