Reputation: 13
I Had to reinstall my android Sdks and set up the whole android environment with Eclipse. I installed android 4.4.2 and 2.2 Sdks respectively and when i created a new android project I am getting diff errors in the console :
1. C:\Users\user\schonkywork\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'
2. C:\Users\user\schonkywork\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
3. C:\Users\user\schonkywork\appcompat_v7\res\values-v21\themes_base.xml:192: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
and these are other Errors :
error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT Problem
The container 'Android Dependencies' references non existing library 'C:\Users\user\schonkywork\appcompat_v7\bin\appcompat_v7.jar' project Build path Build Path Problem
I was working with 2.2 and 4.4.2 earlier and I never had this issue before and not able to build the project now . I haver screen shots of the eclipse IDE but here I am not allowed to post It. Help required Im stuck with this ... I tried diff things mentioned on stack overflow its not helping .. can somebody give me an accurate Solution. ![Screen shot of eclipse][1]
Upvotes: 0
Views: 129
Reputation: 33904
The reason for the error messages you posted is most likely that the target SDK version of the appcompat library is set to 19 (4.4.2) instead of 21 (5.0). The attributes mentioned in your error logs do not exist in the API level 19, thus causing these errors.
You should change that (in Eclipse): Right click on the appcompat project > Properties > Android, and set the Project Build Target to Android 5.0. And make sure you have the SDK for Android 5.0 installed.
Upvotes: 0
Reputation: 1051
I would tell you how to do this, but I will rather give you a better answer which will solve this and many other problems: Switch to Android Studio.
Sure it may take a few days to get used to it and to familiarize yourself with Gradle but it'll all be worth it in the end. You will fall to your knees thanking me.
Also ADT is just too outdated now and all big companies who are doing things right are using Android Studio. It will also make your life easier.
Here is an example of how it will make your life easier. The solution to your problem in Android Studio is just this:
compile 'com.android.support:appcompat-v7:21.0.0'
Whereas if you want to do it in Eclipse then it will get painful.
So do yourself a favor and switch to Android Studio. I can promise that you will never look back.
Happy coding :)
P.S. If this helps please mark this as the correct answer.
Upvotes: 1