MSBUILD : cordo-6ren">
gpt4 book ai didi

android - AAPT : Attribute "layout_anchorGravity" already defined with incompatible format. AND 25.0.3\aapt.exe'' 以非零退出值 1 完成

转载 作者:行者123 更新时间:2023-11-29 23:53:36 25 4
gpt4 key购买 nike

我在 Visual Studio 2017 中有一个 cordova 应用程序项目,到目前为止一直在构建良好。没有对项目进行任何更改。

现在我们遇到了这个构建错误:

1>MSBUILD : cordova-build error : C:\Users\Adam.Akers\Documents\Visual Studio 2015\Projects\BCA\HH\BcaView\platforms\android\build\intermediates\res\merged\debug\values\values.xml:173: AAPT: Attribute "layout_anchorGravity" already defined with incompatible format.    
1>MSBUILD : cordova-build error : C:\Users\Adam.Akers\Documents\Visual Studio 2015\Projects\BCA\HH\BcaView\platforms\android\build\intermediates\res\merged\debug\values\values.xml:172: AAPT: Original attribute defined here.
1>MSBUILD : cordova-build error : FAILURE: Build failed with an exception.
1>MSBUILD : cordova-build error : * What went wrong:
1>MSBUILD : cordova-build error : Execution failed for task ':processDebugResources'.
1>MSBUILD : cordova-build error : > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\ProgramData\Microsoft\AndroidSDK\25\build-tools\25.0.3\aapt.exe'' finished with non-zero exit value 1
1>MSBUILD : cordova-build error : * Try:
1>MSBUILD : cordova-build error : Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
1>MSBUILD : cordova-build error : Picked up _JAVA_OPTIONS: -Xmx512M

任何帮助都会很棒。我已经删除了插件并检查了 SDK 的版本,我们没有做任何更改

最佳答案

AAPT: Attribute “layout_anchorGravity” already defined with incompatible format. AND 25.0.3\aapt.exe'' finished with non-zero exit value 1

根据错误信息“AAPT: Attribute “layout_anchorGravity” already defined with incompatible format.”,您似乎在应用程序中定义了一个名为 layout_anchorGravity 的自定义属性以某种方式与 android-namespaced font attribute introduced in Android O 冲突的代码.尝试重命名或删除该自定义属性,例如:

<declare-styleable name="AATextView">
<attr name="layout_anchorGravity" format="string"/>
</declare-styleable>

<declare-styleable name="AATextView">
<attr name="typeface" format="string"/>
</declare-styleable>

已认证:Error : Attribute “font” already defined with incompatible format

希望这对您有所帮助。

关于android - AAPT : Attribute "layout_anchorGravity" already defined with incompatible format. AND 25.0.3\aapt.exe'' 以非零退出值 1 完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50622202/

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