私のアプリケーションはライブラリを追加しようとするまで正常に動作しました。私は、ライブラリを追加した後に、Androidのメーカーは私に次のエラーを与える:パッケージの属性 'layout_behavior'のリソース識別子が見つかりませんでした
Error:(26) No resource identifier found for attribute 'layout_behavior' in package 'inf..'
これは私のbuild.gradleファイルです:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.ogaclejapan.smarttablayout:utils-v4:[email protected]'
compile 'com.ogaclejapan.smarttablayout:library:[email protected]'
compile 'com.jpardogo.materialtabstrip:library:1.1.0'
// compile 'com.lorentzos.swipecards:library:[email protected]'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile project(':swipelib')
}
これは、エラーが発生したXMLです:
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
私は以下を試しました:
- Removライブラリを
- リセットAndroidスタジオとマイコンピュータ
- gitの前のバージョンのコードに戻しました。
ただし、エラーは解決しません。これをどうやって解決するのですか?
デザインライブラリの最新バージョンを使用していることを確認してください。最新版を入手するには、デザインライブラリの公式ページをチェックしてください。 https://developer.android.com/training/material/design-library.html#AddDependencyこのコメントを書いている時点で、最新バージョンは '' compile 'com.android.support:design:25.3.1' '' ' – Fatih
あなたは私の日@krisLarson –