Xml文件  |  221行  |  8.92 KB

<?xml version="1.0" encoding="UTF-8"?>
<issues format="4" by="lint 3.0.0">

    <issue
        id="RecyclerView"
        message="Do not treat position as fixed; only use immediately and call `holder.getAdapterPosition()` to look it up later"
        errorLine1="        public void onBindViewHolder(ViewHolder holder, final int position) {"
        errorLine2="                                                        ~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/java/com/example/android/support/wear/app/MainDemoActivity.java"
            line="100"
            column="57"/>
    </issue>

    <issue
        id="WearStandaloneAppFlag"
        message="Missing `&lt;meta-data android:name=&quot;com.google.android.wearable.standalone&quot; ../>` element"
        errorLine1="    &lt;application android:icon=&quot;@drawable/app_sample_code&quot; android:label=&quot;SupportWearDemos&quot;"
        errorLine2="    ^">
        <location
            file="src/main/AndroidManifest.xml"
            line="24"
            column="5"/>
    </issue>

    <issue
        id="AllowBackup"
        message="On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute `android:fullBackupContent` to specify an `@xml` resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html"
        errorLine1="    &lt;application android:icon=&quot;@drawable/app_sample_code&quot; android:label=&quot;SupportWearDemos&quot;"
        errorLine2="    ^">
        <location
            file="src/main/AndroidManifest.xml"
            line="24"
            column="5"/>
    </issue>

    <issue
        id="AllowBackup"
        message="Should explicitly set `android:allowBackup` to `true` or `false` (it&apos;s `true` by default, and that can have some security implications for the application&apos;s data)"
        errorLine1="    &lt;application android:icon=&quot;@drawable/app_sample_code&quot; android:label=&quot;SupportWearDemos&quot;"
        errorLine2="    ^">
        <location
            file="src/main/AndroidManifest.xml"
            line="24"
            column="5"/>
    </issue>

    <issue
        id="MergeRootFrame"
        message="This `&lt;FrameLayout>` can be replaced with a `&lt;merge>` tag"
        errorLine1="&lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
        errorLine2="^">
        <location
            file="src/main/res/layout/cpl_demo.xml"
            line="18"
            column="1"/>
    </issue>

    <issue
        id="MergeRootFrame"
        message="This `&lt;FrameLayout>` can be replaced with a `&lt;merge>` tag"
        errorLine1="&lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
        errorLine2="^">
        <location
            file="src/main/res/layout/rd_demo.xml"
            line="18"
            column="1"/>
    </issue>

    <issue
        id="IconLocation"
        message="Found bitmap drawable `res/drawable/app_sample_code.png` in densityless folder">
        <location
            file="src/main/res/drawable/app_sample_code.png"/>
    </issue>

    <issue
        id="GoogleAppIndexingWarning"
        message="App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details."
        errorLine1="    &lt;application android:icon=&quot;@drawable/app_sample_code&quot; android:label=&quot;SupportWearDemos&quot;"
        errorLine2="    ^">
        <location
            file="src/main/AndroidManifest.xml"
            line="24"
            column="5"/>
    </issue>

    <issue
        id="ContentDescription"
        message="Missing `contentDescription` attribute on image"
        errorLine1="    &lt;ImageView"
        errorLine2="    ^">
        <location
            file="src/main/res/layout/rd_demo.xml"
            line="23"
            column="5"/>
    </issue>

    <issue
        id="SetTextI18n"
        message="String literal in `setText` can not be translated. Use Android resources instead."
        errorLine1="            mStateTextView.setText(&quot;Ambient&quot;);"
        errorLine2="                                   ~~~~~~~~~">
        <location
            file="src/main/java/com/example/android/support/wear/app/AmbientModeDemo.java"
            line="52"
            column="36"/>
    </issue>

    <issue
        id="SetTextI18n"
        message="String literal in `setText` can not be translated. Use Android resources instead."
        errorLine1="            mStateTextView.setText(&quot;Interactive&quot;);"
        errorLine2="                                   ~~~~~~~~~~~~~">
        <location
            file="src/main/java/com/example/android/support/wear/app/AmbientModeDemo.java"
            line="60"
            column="36"/>
    </issue>

    <issue
        id="SetTextI18n"
        message="Do not concatenate text displayed with `setText`. Use resource string with placeholders."
        errorLine1="            holder.mView.setText(&quot;Holder at position &quot; + position);"
        errorLine2="                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/java/com/example/android/support/wear/app/SimpleWearableRecyclerViewDemo.java"
            line="66"
            column="34"/>
    </issue>

    <issue
        id="SetTextI18n"
        message="String literal in `setText` can not be translated. Use Android resources instead."
        errorLine1="            holder.mView.setText(&quot;Holder at position &quot; + position);"
        errorLine2="                                 ~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/java/com/example/android/support/wear/app/SimpleWearableRecyclerViewDemo.java"
            line="66"
            column="34"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;Item 1&quot;, should use `@string` resource"
        errorLine1="    &lt;item android:title=&quot;Item 1&quot; android:id=&quot;@+id/item_1&quot; android:icon=&quot;@android:drawable/ic_menu_add&quot;/>"
        errorLine2="          ~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/menu/action_drawer_menu.xml"
            line="3"
            column="11"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;Item 2&quot;, should use `@string` resource"
        errorLine1="    &lt;item android:title=&quot;Item 2&quot; android:id=&quot;@+id/item_2&quot; android:icon=&quot;@android:drawable/ic_menu_agenda&quot;/>"
        errorLine2="          ~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/menu/action_drawer_menu.xml"
            line="4"
            column="11"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;Item 3&quot;, should use `@string` resource"
        errorLine1="    &lt;item android:title=&quot;Item 3&quot; android:id=&quot;@+id/item_3&quot; android:icon=&quot;@android:drawable/ic_menu_call&quot;/>"
        errorLine2="          ~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/menu/action_drawer_menu.xml"
            line="5"
            column="11"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;Item 4&quot;, should use `@string` resource"
        errorLine1="    &lt;item android:title=&quot;Item 4&quot; android:id=&quot;@+id/item_4&quot; android:icon=&quot;@android:drawable/ic_menu_delete&quot;/>"
        errorLine2="          ~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/menu/action_drawer_menu.xml"
            line="6"
            column="11"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;hello world!!&quot;, should use `@string` resource"
        errorLine1="        android:text=&quot;hello world!!&quot;/>"
        errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/layout/ambient_demo.xml"
            line="26"
            column="9"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;FrameLayout&quot;, should use `@string` resource"
        errorLine1="        android:text=&quot;FrameLayout&quot;/>"
        errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/layout/wearable_drawers_frame_layout_demo.xml"
            line="26"
            column="9"/>
    </issue>

    <issue
        id="HardcodedText"
        message="Hardcoded string &quot;ScrollView Fragment&quot;, should use `@string` resource"
        errorLine1="            android:text=&quot;ScrollView Fragment&quot;"
        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="src/main/res/layout/wearable_drawers_scroll_view_demo.xml"
            line="35"
            column="13"/>
    </issue>

</issues>