4

I downloaded an example from developer.android.com

imported in IntellijIDEA and all up. Next, I wanted to connect the library android-support-v7-appcompat to my project. I did it according to instructions:

and many others. And in all cases I have the same error. When you compile the project IntellijIDEA says that there are no resources:

error screen http://www.fayloobmennik.net/4303361

Error:android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v2
Error:android-apt-compiler: [android-support-v7-appcompat] 1\themes_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'.
Error:android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\va
Error:android-apt-compiler: [android-support-v7-appcompat] lues-v21\themes_base.xml:153: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml
Error:(75, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
Error:(79, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
Error:(83, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
Error:(25, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
Error:(29, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
Error:(33, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
Error:(37, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
Error:(41, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
Error:(65, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
Error:(69, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
Error:(45, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:45: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
Error:(49, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:(53, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:53: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
Error:(57, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:57: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
Error:(61, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:61: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
Error:(178, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:178: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
Error:(182, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:182: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
Error:(113, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
Error:(115, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:115: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
Error:(110, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:110: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'.
Error:(107, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:107: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
Error:(121, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:121: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
Error:(126, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:126: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
Error:(138, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
Error:(143, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:143: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
Error:(129, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:129: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.
Error:(132, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:132: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'.
Error:(146, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:146: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:(150, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:150: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:(154, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:154: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:(158, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:158: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:(164, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:164: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'.
Error:(168, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:168: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'.
Error:(172, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:172: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
Error:(174, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:174: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
Error:(93, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'.
Error:(97, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:97: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:(101, -1) android-apt-compiler: [android-support-v7-appcompat] C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base.xml:101: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
C:\Users\Pavel\Desktop\appcompat\res\values-v21\styles_base_text.xml
C:\Users\Pavel\Desktop\appcompat\res\values-v17\styles_rtl.xml
C:\Users\Pavel\Desktop\appcompat\res\values-v21\themes_base.xml
C:\Users\Pavel\Desktop\appcompat\res\values-v11\themes_base.xml
C:\Users\Pavel\Desktop\appcompat\res\values-v14\themes_base.xml

manifest

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.navigationdrawerexample"
    android:versionCode="1"
    android:versionName="1.0">

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

    <application
        android:label="@string/app_name"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/Theme.AppCompat.Light">

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>

</manifest>
Community
  • 1
  • 1

3 Answers3

2

In your project, change Android Build Target to 5.0

To support values-v21, Your Build Target should be 5.0


Go to File -> "Project Structure"

Under Platform Settings -> SDKs you can see android sdk path, classpath and build target.

Update your sdk first with latest build target using sdk manager.

If you're sdk is not up-to date then in the classpath you can see android version below 21.

If you have latest one, then You can see, classpath selected to \android-21\android.jar.

or

In you're Module Settings you can see "Build Tool Version".

Android Studio (IntelliJ IDEA) will be taking latest build version. So first update you're sdk manager to latest version.

Harsha Vardhan
  • 3,324
  • 2
  • 17
  • 22
0

The Material style request Android Build Tools version 20+ and compile sdk version 21+. if you use Gradle build system,change compileSdkVersion 21 or higher inside the build.gradle file.

Yann CCC
  • 11
  • 1
0
  1. Make sure you in your workspace, the android support lib existed.
  2. Open your project properties, go to tab Android, and check the linked library is available or not.
    If the support library is marked red X, that means you should see your library link folder. This error occurs mostly when you put the library and the source not the same workspace.
kidnan1991
  • 366
  • 2
  • 12