2017-03-22 13 views
3

まず私は、サイトに新しいだということを教えてみましょう。投稿に関するすべての問題は、許してください。私はこのサイトの解決策が問題を解決するのを見出していました。しかし、ここで私は立ち往生した。私は多くの検索を行いましたが、提供されたソリューションで解決しようとしましたが、そこにはまだ問題があります。私を助けてください。ないリソースそれは(「スタイル/ AppTheme.AppBarLayout @」価値の「テーマ」で)指定された名前と一致してい

ここ

build.gradleコード

レイアウトファイル

<android.support.design.widget.CoordinatorLayout 
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:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true" 
tools:context="com.example.user.securedata.DataProtectionSelective"> 

<android.support.design.widget.AppBarLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/AppTheme.AppBarLayout"> 

    <android.support.v7.widget.Toolbar 
     android:id="@+id/toolbar" 
     android:layout_width="match_parent" 
     android:layout_height="?attr/actionBarSize" 
     android:background="?attr/colorPrimary" 
     app:popupTheme="@style/AppTheme.PopupOverlay" /> 

</android.support.design.widget.AppBarLayout> 

<include layout="@layout/content_main" /> 

<android.support.design.widget.FloatingActionButton 
    android:id="@+id/fab" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="bottom|end" 
    android:layout_margin="@dimen/fab_margin" 
    android:src="@android:drawable/ic_dialog_email" /> 

</android.support.design.widget.CoordinatorLayout> 

のstyles.xml

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> 
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> 

です210

compile 'com.android.support:appcompat-v7:25.1.0' compile 'com.google.code.gson:gson:2.2.4' compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.android.support:recyclerview-v7:25.1.0' compile 'com.android.support:design:25.1.0' 
+2

を試してみてください。私は「=あなたは – SripadRaj

+0

変更<スタイル名=「AppTheme.AppBarOverlay」親=「ThemeOverlay.AppCompat.Dark.ActionBar」/>に<スタイル名=「AppTheme.AppBarLayout」親AppTheme.AppBarOverlay' 'にそれを変更する必要が推測しますThemeOverlay.AppCompat.Dark.ActionBar "/> – DkThakur

+0

申し訳ありません。私は間違いを犯した。無視してください – Shekar

答えて

3

は、あなたがあなたのスタイルで `AppTheme.AppBarLayout`を持っていけないこの

<android.support.design.widget.AppBarLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> 

    <android.support.v7.widget.Toolbar 
     android:id="@+id/toolbar" 
     android:layout_width="match_parent" 
     android:layout_height="?attr/actionBarSize" 
     android:background="?attr/colorPrimary" 
     app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> 

</android.support.design.widget.AppBarLayout> 
+0

はい、現在動作しています。ありがとう – Shekar

関連する問題