0

I have Android API 21 and 20. But libgdx not work in 21! Last version libgdx work with API 20. But when I build project with API 20, Eclipse return error:

"appcompat_v7/res/values-v21/themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'."

I finded more answers about this, but everybody tell what you need use API 21.

Appcompat v7 and ActionBarActivity

What me do?

P.S. Sorry for my English!

Community
  • 1
  • 1
scientistnik
  • 343
  • 4
  • 19

1 Answers1

0

Since I was in a similar situation a couple of days back, I think the following might work(assuming you're using BaseGameUtils in your project, or any module that uses appCompat)

  1. Open the project in Android Studio
  2. Double click on the build.gradle file of the module which uses appCompat(for me, it was BaseGameUtils)
  3. change the dependencies as following(sorry for the bad formatting, I'm in a hurry):

    dependencies { compile 'com.android.support:appcompat-v7:22.0.0' compile 'com.android.support:support-v4:20.0.+' compile 'com.google.android.gms:play-services:+' }

    android { compileSdkVersion 22 buildToolsVersion '22.0.1' }

    This is the because these values are the latest at the time of this writing.

  4. Double click on build.gradle of the android module and change the values of the compileSdkVersion and buildToolsVersion to the values given above.

  5. Save, sync with gradle, clean the project and rebuild it.

DroidHeaven
  • 2,414
  • 3
  • 25
  • 31