我想在一个项目中使用标题中提到的库。有没有办法在一个项目中使用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