Android:“未在任何地方定义ID”,但显然是

时间:2019-02-20 07:17:23

标签: android

我因引用此行而收到此错误 RewriteOptions inherit RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond $1 !^(index.php|resources|robots.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L,QSA] Redirect 301 /pages/product_popup/1 /product-syrup/ ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ## 我什至不知道这怎么可能,因为android本身会自动用ID名称来完成我的操作。

这是完整的布局文件。

android:layout_below="@id/nav_drawer_header_include"

1 个答案:

答案 0 :(得分:1)

使用此

android:id="@+id/nav_drawer_header_include"

代替这个

android:id="nav_drawer_header_include"

示例代码

<include layout="@layout/nav_header_main"
    android:id="@+id/nav_drawer_header_include"/>

<ListView android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_below="@id/nav_drawer_header_include">