【问题标题】:"Namespace is not bound" in Android Lint checkAndroid Lint 检查中的“命名空间未绑定”
【发布时间】:2013-06-29 03:08:13
【问题描述】:

我在 Android Studio 中,运行 lint 检查时出现“未绑定命名空间”。这是什么意思?我的代码仍然可以正常工作,我只是好奇。警告是针对 LinearLayout 标签(打开和关闭)。

<?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>

【问题讨论】:

    标签: android namespaces android-studio lint


    【解决方案1】:

    我正在使用“w3-CSS”,为了解决上述问题,我为使用 line-height 属性的标签添加了一个 CSS 元素。尝试将其包含在样式定义中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-11
      • 2019-02-25
      相关资源
      最近更新 更多