I'm getting SrcCompat errors when I sync my project. I have a relative layout with a number buttons and 4 ImageViews. Here is one of the ImageViews:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
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.bigal.datacollecter_v1.MainActivity">
<ImageView
android:id="@+id/imLogoLL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@android:drawable/arrow_down_float"
android:layout_above="@+id/imRinkL"
android:layout_alignLeft="@+id/imRinkL"/>
.......
Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.example.bigal.datacollecter_v1"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.0'
Here is 1 of 4 identical errors from the gradle console output:
C:\Users\bigal\AndroidStudioProjects\DataCollecter_V1\app\src\main\res\layout\activity_main.xml
Error:(766) No resource identifier found for attribute 'srcCompat' in package 'com.example.bigal.datacollecter_v1'
I've tried: changing srcCompat to src (I get an unexpected namespace error), change res-auto to namespace, change accompat-v7 version, restart, make project, invalidate cache, clean, etc. as per No resource identifier found for attribute 'srcCompat' in package 'learnapp.android.example.com.learnapp'
I'm trying to target Lollipop and eventually move to API 23. Thanks for suggestions!