简体   繁体   中英

"Namespace is not bound" in Android Lint check

I'm in Android Studio, and I get "Namespace is not bound" when running a lint check. What does this mean? My code still works fine, I'm just curious. The warning is for the LinearLayout tag (opening and closing).

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/outerLayoutWithMargins"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/bla"
        android:gravity="center"
        android:layout_marginTop="20dp"
        android:layout_marginBottom="4dp"
        android:textStyle="bold"
        android:textColor="@color/bla"/>

    <View
        android:id="@+id/bla"
        android:background="@color/bla"
        android:layout_width="fill_parent"
        android:layout_height="3dp" />

    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice"
        android:divider="#000000"
        android:dividerHeight="0.5dp"/>

</LinearLayout>

I am using "w3-CSS", and to get around the problem mentioned, I add a CSS element for the tag in which I use the line-height attribute. Try to include it in the style definition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM