亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

錯誤膨脹類android.Support.Design.widget.NavigationView

錯誤膨脹類android.Support.Design.widget.NavigationView

滄海一幻覺 2019-11-05 09:04:24
錯誤膨脹類android.Support.Design.widget.NavigationView我學習了一個關于新組件的教程。導航視圖在“支持設計庫”中,無法通過以下錯誤消息:Error inflating class android.support.design.widget.NavigationView我試過這里的每一種方法使用任何Android設計支持庫元素時出錯但是錯誤信息仍然存在。XML<android.support.v4.widget.DrawerLayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/drawer_layout"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:fitsSystemWindows="true" >     <RelativeLayout         android:layout_width="match_parent"         android:layout_height="match_parent" >     <include layout="@layout/toolbar" android:id="@+id/mainToolBar" />     <fragment android:name="com.ais.cherry.fragment.LoginFragment"         android:id="@+id/loginFragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_below="@id/mainToolBar" />     <fragment     android:name="com.ais.cherry.fragment.WaterFallFragment"         android:id="@+id/mainFragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_below="@id/mainToolBar" />     <fragment android:name="com.ais.cherry.fragment.SearchFragment"         android:id="@+id/searchFragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_below="@id/mainToolBar" />     <fragment android:name="com.ais.cherry.fragment.ChatMainFragment"         android:id="@+id/chatMainFragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_below="@id/mainToolBar" />     <fragment android:name="com.ais.cherry.fragment.ProfileFragment"         android:id="@+id/profileFragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_below="@id/mainToolBar" />任何幫助都將不勝感激
查看完整描述

3 回答

?
慕碼人2483693

TA貢獻1860條經驗 獲得超9個贊

我也犯過類似的錯誤。當我用

<style?name="AppTheme.Base"?parent="Theme.AppCompat.Light.NoActionBar">

????<item?name="colorPrimary">#673AB7</item>
????<item?name="colorPrimaryDark">#512DA8</item>
????<item?name="colorAccent">#00BCD4</item>
????<item?name="android:textColorPrimary">#212121</item>
????<item?name="android:textColorSecondary">#727272</item></style>

當我移除Android:textColor小學和Android:textColor二級主題項時,對我有用。

<style?name="AppTheme.Base"?parent="Theme.AppCompat.Light.NoActionBar">

????<item?name="colorPrimary">#673AB7</item>
????<item?name="colorPrimaryDark">#512DA8</item>
????<item?name="colorAccent">#00BCD4</item></style>

嘗試使用一個非常簡單的應用程序主題來開始。

編輯:

這,這個補習會有幫助的。我的理解是,使用“Android:text著色小學”需要最低的API級別21。在沒有使用“android:”的情況下使用相同的標記,使用設計支持庫。任何支持庫小部件都將嘗試查找“textColor主體”項,而不是“android:textColor變得”,如果找不到相同的項,就會拋出上面提到的錯誤。



查看完整回答
反對 回復 2019-11-06
  • 3 回答
  • 0 關注
  • 422 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號