の最後のAndroid studio
のget問題で:属性が見つかりませんリソース識別子「srcCompat」パッケージ
Error:(11) No resource identifier found for attribute 'srcCompat' in package 'com.example.NAMEGAME'
私はレイアウトにGIFアニメーションを追加します。 マイコード:
<?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>
私はxmlns:app="http://schemas.android.com/apk/res-auto"
でthatsの問題を発見しました。一部の人々はそれをxmlns:app="http://schemas.android.com/apk/lib/com.example.NAMEGAME"
に変更することをお勧めします。しかし、それは助けにはならない。
どのように私のアンドロイドプロジェクトでgif-animation(またはappを使用)を追加できますか?
p.s.私の英語には申し訳ありません。
'resを-auto'が正確である私のために働いた
android:src="@drawable/forma1gif"
を使用するので、 代わりの
app:srcCompat="@drawable/forma1gif"
を同様の課題がありました。あなたはおそらく、サポートライブラリ – Blackbelt