I'll start from what I want to achieve: building the googlecast-manager example provided here: https://github.com/googlecast/GameManagerSamples I followed instructions here: https://developers.google.com/cast/docs/android_sender
So first I downloaded from github the project, then with the Android SDK Manager I downloaded Android Support Libraries and Google play Services. Then in my project, I went to "Open Modules Setting->Add" then went to "Android SDK\extras\android\support\v7\appcompat" and added it.
Then first step to ensure it's working is to build it. So I right clicked on appcompat->"Compile Module Appcompat" but it fails with 2 errors:
Error:(20, -1) android-apt-compiler: [appcompat] D:\Android SDK\extras\android\support\v7\appcompat\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:(19, -1) android-apt-compiler: [appcompat] D:\Android SDK\extras\android\support\v7\appcompat\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Doing the same for Google Play works like a charm.
I've tried to find videos/other similar issues but it's either too complicated or not my problem.
Here is the AndroidManifest.xml of appcompat:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.support.v7.appcompat">
<uses-sdk android:minSdkVersion="9"
android:targetSdkVersion="19"/>
<application />
I believe you should upgrade your
compileSdkVersion
. Check yourbuild.grade
file, should be something like:Of course you will need to download the newest Android SDK and build tools (and whatever else you need) from the SDK Manager.
I was having problem with new appcompat V-23 as my target sdk is 21. So I did following two steps and it works perfectly for me..
1) Delete the values-23 folder in res folder.
2) I was getting error on the src folder as well, so commented the only line inside main() of snippet.java as we do not require it.
Then add this project as library to your project.. Hope it helps.
You have to update your SDK to the
API 23
that is either not downloaded or not installed properly.In your
build.gradle
setI resolved like below
replaced the above
dependencies
with below...You have to update your SDK to the API 23 that is either not downloaded or not installed properly. Make sure your
compileSdkVersion
anddependencies
version should be same.My issue was, one of my un-used dependencies was using sdk-23 version. So after removing those un-used dependencies it worked like a charm.