Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'

I get this error when trying to use latest Google Play Services SDK:

C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.

I am targetting android-19 but have also tried android-21 with same result. I have the Android Support Library enter image description here

If I use older version of Google Play Services (rev. 21), the error is not there. Also there is no folder values-v21 in the earlier version. How to fix this error?

EDIT: I have tried using API 21 but this error persists. in manifest.xml:

<uses-sdk android:minSdkVersion="21"        
      android:targetSdkVersion="21" />

in project.properties:

target=android-21
like image 897
morpheus Avatar asked Dec 19 '15 22:12

morpheus


2 Answers

Follow these steps

  • Right click, Properties of google-play-services_lib project
  • goto java compiler and set it to 1.5
  • goto android and set project build target to android 6.0
  • make sure you installed latest update for android sdk tools and google play services in your sdk

Close the project and Open it, this helps too.

like image 169
Sharad Kesari Avatar answered Sep 18 '22 18:09

Sharad Kesari


I fixed it by changing the minSdkVersion in google-play-services_lib manifest to the minimum SDK version used by my app. Example: <uses-sdk android:minSdkVersion="14"/>

like image 20
Aspiring Dev Avatar answered Sep 21 '22 18:09

Aspiring Dev