A
A
Andrew2016-10-22 13:20:22
android studio
Andrew, 2016-10-22 13:20:22

No resource identifier found for attribute 'srcCompat' in package how to fix?

I am facing error in android studio for imageVIew element:

Error:(11) No resource identifier found for attribute 'srcCompat' in package 'com.example.NAMEGAME'

After a little googling, I realized that the error in
xmlns:app="http://schemas.android.com/apk/res-auto"

Suggest replacing with
xmlns:app="http://schemas.android.com/apk/lib/com.example.NAMEGAME"

Arc starts, but then the imageView element does not show.
Update, changing xmlns:app=" schemas.android.com/apk/res-auto " to anything didn't help, starts but doesn't work.
Here is part of the .xml layout code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.NAMEGAME.forma1"
    android:id="@+id/forma1">

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:srcCompat="@drawable/forma1gif"
        />
</LinearLayout>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question