0

I have an AppCompatActivity, and the moment I want to run my code. I get this error at the start of the Activity:

You need to use a Theme.AppCompat theme (or descendant) with this activity

If I use Theme.AppCompat as it advises me, but then I get this:

Cannot resolve @style/Theme.AppCompat.Light.NoActionBar

Neither in the AndroidManifest.xml, nor in the styles files I can use it.

I am using those dependencies:

compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.parse:parse-android:1.15.8'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile "com.android.support:support-core-utils:25.4.0"
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:support-v4:25.4.0'
James Z
  • 12,209
  • 10
  • 24
  • 44

3 Answers3

0

Clean & rebuild your project !

Mahdi Zarei
  • 155
  • 7
0

I think you should use Activity instead of AppCompatActivity

Check this answer : https://stackoverflow.com/a/21815015/8239508

Karim
  • 322
  • 1
  • 10
0

You have mixed android support library versions in your dependencies. Make sure all com.android.support:* have the same version number.

SpaceBison
  • 2,525
  • 1
  • 21
  • 38