0

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!

Community
  • 1
  • 1
DHHJ
  • 103
  • 1
  • 12
  • Possible duplicate of [No resource identifier found for attribute 'srcCompat' in package 'learnapp.android.example.com.learnapp'](http://stackoverflow.com/questions/38161864/no-resource-identifier-found-for-attribute-srccompat-in-package-learnapp-andr) – Chisko Feb 14 '17 at 17:01
  • I tried each of the suggestions previously from that link- changed srcCompat, changed res-auto, changed appcompatv7 version. Didn't work! – DHHJ Feb 14 '17 at 17:10
  • Did you update `'com.android.support:appcompat-v7:22.2.0'` to the latest? I think it's 22.2.1 – Chisko Feb 14 '17 at 17:10
  • 22.2.1 didn't help. – DHHJ Feb 14 '17 at 17:17
  • I haven't been able to find a repo or historial of it in more than two years I've been doing this. I think the closest source would be http://android-developers.googleblog.com – Chisko Feb 14 '17 at 17:23
  • I don't understand your last comment – DHHJ Feb 14 '17 at 17:28

1 Answers1

0

I couldn't get it working. I created a new project and transferred all files and code over and it worked properly.........

DHHJ
  • 103
  • 1
  • 12