0

Yesterday the project worked fine, but today it suddenly told me "You need to use a Theme.AppCompat theme (or descendant) with this activity.", but all of my activities ALREADY extended AppCompatActivity!

I tried to fix this using the solutions from You need to use a Theme.AppCompat theme (or descendant) with this activity but now after i changed all of my activities to extend Activity, all of the screens(activities) are with black background, like this: screen after fix

What happened? all I did today was to change my build.gradle. I changed from

'compile com.google.android.gms:play-services:9.4.0'
to

    compile 'com.google.android.gms:play-services-location:9.4.0'
    compile 'com.google.android.gms:play-services-maps:9.4.0'
    compile 'com.google.android.gms:play-services-places:9.4.0'

How to fix this? I want all my activities back to normal..

styles.xml:

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

Any help will be appreciated, Thanks

Community
  • 1
  • 1
user3552460
  • 27
  • 1
  • 9
  • please post the styles file and your mainfest – Hala.M Sep 04 '16 at 10:31
  • Possible duplicate of [You need to use a Theme.AppCompat theme (or descendant) with this activity after adding google-play-services](http://stackoverflow.com/questions/26723822/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity-after) – piotrek1543 Sep 04 '16 at 10:31
  • check the link above – piotrek1543 Sep 04 '16 at 10:31
  • i changed all of my activities back to "extends AppCompatActivity" and then did the solution above - didn't help – user3552460 Sep 04 '16 at 10:49
  • Your manifest determines the theme of an Activity, not what class it extends. It's because you are extending AppCompatActivity that you do get the error. One of those activities isn't using an AppCompat theme – OneCricketeer Sep 04 '16 at 14:17

0 Answers0