Gradle错误:app:processDevDebugManifest添加<supports-screens>时失败

时间:2017-05-08 06:25:13

标签: android build.gradle

我正在替换&lt;兼容屏幕&gt;到&lt;支持屏幕&gt;。并且ZXing库代码的依赖性问题是扫描条形码。错误显示如下。

  

AndroidManifest.xml:121:9-37错误:属性   support-screens @ smallScreens value =(false)from   AndroidManifest.xml:121:9-37也出现在[xyz:未指定]   AndroidManifest.xml:17:9-36 value =(true)。

     

:app:processDevDebugManifest FAILED

     

失败:构建因异常而失败。

我还添加了工具:在清单中替换。

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="c.x.y">

    <!--<compatible-screens>-->

        <!--&lt;!&ndash; all small size screens &ndash;&gt;-->
        <!--&lt;!&ndash; <screen android:screenSize="small" android:screenDensity="ldpi" /> &ndash;&gt;-->
        <!--<screen-->
            <!--android:screenDensity="mdpi"-->
            <!--android:screenSize="small" />-->
        <!--<screen-->
            <!--android:screenDensity="hdpi"-->
            <!--android:screenSize="small" />-->
        <!--<screen-->
            <!--android:screenDensity="xhdpi"-->
            <!--android:screenSize="small" />-->
        <!--<screen-->
            <!--android:screenDensity="480"-->
            <!--android:screenSize="small" /> &lt;!&ndash; xxhdpi &ndash;&gt;-->
        <!--<screen-->
            <!--android:screenDensity="640"-->
            <!--android:screenSize="small" /> &lt;!&ndash; xxxhdpi &ndash;&gt;-->


        <!--&lt;!&ndash; all normal size screens &ndash;&gt;-->
        <!--&lt;!&ndash; <screen android:screenSize="normal" android:screenDensity="ldpi" /> &ndash;&gt;-->
        <!--<screen-->
            <!--android:screenDensity="mdpi"-->
            <!--android:screenSize="normal" />-->
        <!--<screen-->
            <!--android:screenDensity="hdpi"-->
            <!--android:screenSize="normal" />-->
        <!--<screen-->
            <!--android:screenDensity="xhdpi"-->
            <!--android:screenSize="normal" />-->
        <!--<screen-->
            <!--android:screenDensity="420"-->
            <!--android:screenSize="normal" />-->
        <!--<screen-->
            <!--android:screenDensity="480"-->
            <!--android:screenSize="normal" />-->
        <!--<screen-->
            <!--android:screenDensity="560"-->
            <!--android:screenSize="normal" />-->
        <!--<screen-->
            <!--android:screenDensity="640"-->
            <!--android:screenSize="normal" />-->
    <!--&lt;!&ndash; all small size screens &ndash;&gt;-->
    <!--&lt;!&ndash; <screen android:screenSize="small" android:screenDensity="ldpi" /> &ndash;&gt;-->
    <!--<screen-->
    <!--android:screenDensity="mdpi"-->
    <!--android:screenSize="small" />-->
    <!--<screen-->
    <!--android:screenDensity="hdpi"-->
    <!--android:screenSize="small" />-->
    <!--<screen-->
    <!--android:screenDensity="xhdpi"-->
    <!--android:screenSize="small" />-->
    <!--<screen-->
    <!--android:screenDensity="480"-->
    <!--android:screenSize="small" /> &lt;!&ndash; xxhdpi &ndash;&gt;-->
    <!--<screen-->
    <!--android:screenDensity="640"-->
    <!--android:screenSize="small" /> &lt;!&ndash; xxxhdpi &ndash;&gt;-->


    <!--&lt;!&ndash; all normal size screens &ndash;&gt;-->
    <!--&lt;!&ndash; <screen android:screenSize="normal" android:screenDensity="ldpi" /> &ndash;&gt;-->
    <!--<screen-->
    <!--android:screenDensity="mdpi"-->
    <!--android:screenSize="normal" />-->
    <!--<screen-->
    <!--android:screenDensity="hdpi"-->
    <!--android:screenSize="normal" />-->
    <!--<screen-->
    <!--android:screenDensity="xhdpi"-->
    <!--android:screenSize="normal" />-->
    <!--<screen-->
    <!--android:screenDensity="420"-->
    <!--android:screenSize="normal" />-->
    <!--<screen-->
    <!--android:screenDensity="480"-->
    <!--android:screenSize="normal" />-->
    <!--<screen-->
    <!--android:screenDensity="560"-->
    <!--android:screenSize="normal" />-->
    <!--<screen-->
    <!--android:screenDensity="640"-->
    <!--android:screenSize="normal" />-->
    <!--</compatible-screens>-->

    <supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="false"
        android:xlargeScreens="false" />

    <application
        android:allowBackup="false"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/AppTheme"
        tools:replace="android:label, android:icon, android:allowBackup, android:smallScreens, android:xlargeScreens">

感谢。

0 个答案:

没有答案