kiwicode
kiwicode

Reputation: 43

Adding dependencies gives cant resolve symbol 'R' error Android Studio

Adding these dependecines below for some reason affects the R class

  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:21.0.0'
  compile 'com.google.android.gms:play-services:6.+'

This is the manifest File

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.example.kiwi.clamprice" >
    <uses-sdk android:minSdkVersion="17"
      android:targetSdkVersion="19"
    />
  <uses-permission android:name="android.permission.INTERNET"/>


 <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <activity
        android:name=".MyActivity"
        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>

This is the activity_my.xml file

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.clamcoinPriceChecker.MainActivity"
android:background="@drawable/gradient"
 >

 <EditText
     android:id="@+id/donate"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_centerHorizontal="true"
     android:layout_centerVertical="true"
     android:ems="10" >
 </EditText>

 <Button
     android:id="@+id/update"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_below="@+id/donate"
     android:layout_centerHorizontal="true"
     android:layout_marginTop="36dp"
     android:text="Update" />

 <TextView
     android:id="@+id/title"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_above="@+id/donate"
     android:layout_centerHorizontal="true"
     android:text="Loading..."
     android:textSize="40sp"
     android:textColor="#ffffff"
     android:textStyle="bold"
     android:textAppearance="?android:attr/textAppearanceLarge" />

 <TextView
     android:id="@+id/textview2"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_above="@+id/title"
     android:layout_centerHorizontal="true"
     android:text="Price of Clam"
     android:textAppearance="?android:attr/textAppearanceMedium"
     android:textColor="#ffffff" />

 <com.google.android.gms.ads.AdView
     xmlns:ads="http://schemas.android.com/apk/lib-auto"
     android:id="@+id/adView"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_alignParentBottom="true"
     android:layout_centerHorizontal="true"
     ads:adSize="BANNER"
     ads:adUnitId="ca-app-pub-6521186892035757/5231806827" />


   </RelativeLayout>

Ive tried many things to try to fix this, i tried to restart android studio, rebuilding and cleaning the project and none of it worked.

Information:Compilation completed with 68 errors and 0 warnings in 12 sec Information:68 errors Information:0 warnings Error:Gradle: Execution failed for task ':app:processDebugResources'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\MYSTUFF\AppData\Local\Android\android-studio\sdk\build-tools\android-4.4W\aapt.exe package -f --no-crunch -I C:\Users\MYSTUFF\AppData\Local\Android\android-studio\sdk\platforms\android-20\android.jar -M C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\manifests\debug\AndroidManifest.xml -S C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug -A C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\assets\debug -m -J C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\generated\source\r\debug -F C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\libs\app-debug.ap_ --debug-mode --custom-package com.example.kiwi.clamprice -0 apk --output-text-symbols C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\symbols\debug Error Code: 1 Output: C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:9: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:11: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:13: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:21: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:27: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:35: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:39: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:43: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:45: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:47: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:51: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:53: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:55: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:57: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:59: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:61: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:63: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:67: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:71: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:73: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:77: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v11\values.xml:39: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v14\values.xml:12: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v11\values.xml:46: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v14\values.xml:20: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v11\values.xml:53: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v14\values.xml:28: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v11\values.xml:60: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v14\values.xml:36: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:87: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:89: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:108: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:267: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:269: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:271: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:273: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:275: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:285: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:287: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:289: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:291: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:293: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:295: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:297: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:301: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:304: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:306: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:308: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:310: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:314: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:317: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:319: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:321: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:323: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:329: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:331: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:336: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:341: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:346: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:147: error: Error: No resource found that matches the given name: attr 'android:colorAccent'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:149: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:150: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:148: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:145: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:146: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:185: error: Error: No resource found that matches the given name: attr 'android:colorAccent'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:187: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:188: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:186: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:183: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:184: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:223: error: Error: No resource found that matches the given name: attr 'android:colorAccent'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:225: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:226: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:224: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:221: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:222: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:261: error: Error: No resource found that matches the given name: attr 'android:colorAccent'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:263: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:264: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:262: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:259: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\res\debug\values-v21\values.xml:260: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. C:\Users\MYSTUFF\WorkspaceAndroidStudio\ClamPrice2\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v21\values.xml Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'. Error:Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.

Upvotes: 2

Views: 3379

Answers (3)

Matt
Matt

Reputation: 1911

In Android Studio:
File --> Project Structure --> Properties tab --> Ensure your "Compile SDK Version" is set to API 21.

The support v7 resources will only be loaded if you're compiling for at least API 21.

Upvotes: 1

Willis
Willis

Reputation: 5336

Most of the time the error message "Cannot resolve symbol 'R'" occurs due to a corrupted XML file, be it the AndroidManifest.xml file, a layout file, or a values file; check all of your XML files and make sure that there are no errors in them. Also make sure that you there are no duplicate resource directories or invalid Drawable names. Make sure that after you check everything you clean and rebuild the project again, just for good measure.

If you find no issues and still cannot compile successfully, you might try saving and re-importing the project. Creating a new Workspace has also been know to solve certain issues.

EDIT

Also, I do not see the closing tag for your AndroidManifest.xml file - you should have </manifest> at the end of your file.

Lastly, have you ensured that you added the dependencies in the application/modue build.gradle file and not the top-level build.gradle file?

EDIT 2

Make sure that all of your resources and folders are lowercase; having any uppercase letters in resource names or directories could cause issues, and would be a tricky thing to diagnose.

Also, have you tried manually refreshing your dependencies? You can do so by using the command line option: --refresh-dependencies and/or by manually deleting the dependencies cache ~/.gradle/caches. Follow the dependencies refresh with a project clean/rebuild.

I also see that you plan on using Google Play Service in your application, as denoted by the dependency import. Have you ensured that you have downloaded both "Google Play Services" AND "Google Repository" via the SDK Manager? "Google Play Services" will not work without "Google Repository".

One last thing to try would be to call out a specific version for the com.google.android.gms:play-services in the build.gradle file; see this thread: After update - Error:Failed to find: com.google.android.gms:play-services:5.2.8 . Check to make sure that you have followed all of the appropriate steps for integrating Google Play Services into your application, as descriped in the Android Developer Documentation: http://developer.android.com/google/play-services/setup.html

Also make sure that, after you make any changes to the dependencies, you sync the updated gradle files with the project.

Upvotes: 0

alib_15
alib_15

Reputation: 286

Open the Android SDK Manager and ensure you have the latest:

Android SDK Tools
Android SDK Build Tools
SDK Platform

Open your projects properties and ensure the Project Build Target is set to use the latest platform (5.0).

Upvotes: 1

Related Questions