gpt4 book ai didi

android - Gradle 错误 :app:processDevDebugManifest FAILED when added

转载 作者:行者123 更新时间:2023-11-30 00:33:25 25 4
gpt4 key购买 nike

我正在将 替换为 。扫描条码是 ZXing 库代码的依赖性问题。错误显示如下。

AndroidManifest.xml:121:9-37 Error: Attribute supports-screens@smallScreens value=(false) from AndroidManifest.xml:121:9-37 is also present at [xyz:unspecified] AndroidManifest.xml:17:9-36 value=(true).

:app:processDevDebugManifest FAILED

FAILURE: Build failed with an exception.

我还在 list 中添加了 tools:replace。

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

谢谢。

最佳答案

已解决:

我没有在 application 标签中使用 tools:replace,而是移到了 中,它起作用了。

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

关于android - Gradle 错误 :app:processDevDebugManifest FAILED when added <supports-screens>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43841055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com