0
這裏我附上了我的程序。在本程序中2 有錯誤。我不知道如何才能徹底清除這些錯誤...錯誤:(4,28)找不到與給定名稱相匹配的資源('layout_height'值爲'@ dimen/nav_header_height')
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"/>
<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/AlertDialog.AppCompat.Light" >
<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/activity_horizontal_margin"
android:src="@android:drawable/ic_dialog_email" />
Post cont ent_main.xml – Raghavendra
使用RelativeLayout(@ id/LinearLayout \ _acc,@ id/ProgressBar \ _statusScreen)時可能出現[Android xml錯誤:找不到與給定名稱匹配的資源]的重複(http://stackoverflow.com/questions/11668718/android-xml-error-no-resource-found-that-matches-the-name-name-with-relative) –
創建'dimen.xml'並創建一個資源'nav_header_height',並在' dp' –