4

I want to use the support action bar so I need to extend my activity from ActionBarActivity in the support library. However my activity is ready extending from BaseGameActivity...

I tried to modify the BaseGameActivity to extend from ActionBarActivity instead of FragmentActivity, but lots of errors were reported in the SDK XML about themes after I add the support library to gamebaseutils librarys, the errors were like:

...BaseGameUtils] C:\Program Files\adt-bundle-windows\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.

Do you have any idea of getting them work together? Thank you!

Qianqian
  • 2,104
  • 18
  • 28
  • I did the same and it worked for me. Maybe the problem is in the supportlibraries? – Ragnar May 14 '14 at 20:27
  • @Ragnar, Did you use the ActionBarActivity from support library? If I use the ActionBarActivity from the SDK, it won't have such problems. – Qianqian May 16 '14 at 13:32
  • You should include the support library in the basegameactivity in the project config (gradle files) – Ragnar May 16 '14 at 20:30
  • @Ragnar, Thank you for the reply! I think I did that. (quote: "after I added the support library to gamebaseutils"). I in the end gave up this approach and instead let the app only support Android 4.0+. Thank you all the same for the comments! – Qianqian May 19 '14 at 02:09
  • http://stackoverflow.com/questions/18370816/no-resource-found-that-matches-the-given-name-style-theme-holo-light-darkacti – petey Sep 17 '14 at 19:47

0 Answers0