gpt4 book ai didi

Android Support Library Build v26.X.X Build Error : Attribute “fontFamily” already defined with incompatible format

转载 作者:行者123 更新时间:2023-12-03 05:08:06 31 4
gpt4 key购买 nike

我将我的支持构建库从 25.4.0 更新到 26.x.x,我得到了

AGPBI: {"kind":"error","text":"Original attribute defined here.","sources":[{"file":"/Users/me/AndroidStudioProjects/Mail/mail/build/intermediates/res/merged/dev/debug/values/values.xml","position":{"startLine":40}}],"original":"","tool":"AAPT"}
/Users/me/AndroidStudioProjects/Mail/mail/build/intermediates/res/merged/dev/debug/values/values.xml:373: error: Attribute "fontFamily" already defined with incompatible format.
/Users/me/AndroidStudioProjects/Mail/mail/build/intermediates/res/merged/dev/debug/values/values.xml:41: Original attribute defined here.

我确实清理了项目->重建,使工作室无效并重新启动,从 android:fontFamily 中删除前缀 android(现在只是 fontFamily 在项目中),从其他库中排除模块(存在冲突)。

我的样式.xml:
<style name="CurrentTheme" parent="@style/AppTheme.Base">
<!-- Common styles -->
<item name="android:windowBackground">@color/bg</item>
<item name="android:colorBackground">@color/bg</item>
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextView</item>

<item name="android:actionOverflowButtonStyle">@style/OverFlow.Light</item>
<item name="actionOverflowButtonStyle">@style/OverFlow.Light</item>
<item name="actionModeStyle">@style/MessagesListActionMode</item>
<item name="actionModeCloseDrawable">@drawable/ic_action_cancel</item>

<item name="android:itemTextAppearance">@style/myCustomMenuTextApearance</item>
<item name="searchViewStyle">@style/MySearchViewStyle</item>

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

<item name="colorAccent">@color/logo_color</item>

<item name="colorControlNormal">@color/col888</item>
<item name="colorControlActivated">@color/logo_color</item>

<item name="homeAsUpIndicator">@drawable/ab_back_button_bg_states</item>

<item name="alertDialogTheme">@style/CurrentTheme.AlertDialog</item>

<item name="actionMenuTextColor">@color/logo_color</item>
<item name="toolbarStyle">@style/CurrentTheme.Toolbar</item>
</style>

<style name="CurrentTheme.WithoutPreview" parent="CurrentTheme.Transparent" >
<item name="android:windowDisablePreview">true</item>
</style>

<style name="CurrentTheme.Transparent" parent="CurrentTheme" />

<style name="TodoWelcomeTheme" parent="@style/CurrentTheme" />

<style name="CurrentTheme.Toolbar" parent="@style/Widget.AppCompat.Toolbar">
<item name="contentInsetStart">72dp</item>
</style>

<style name="CurrentTheme.AlertDialog" parent="@style/Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/color14</item>
</style>

<style name="CurrentTheme.AlertDialog.ButtonBarStyle" />

<style name="OverFlow.Light" parent="@android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:contentDescription">@string/overflow_expose_cd</item>
<item name="android:src">@drawable/ic_overflow_blue</item>
</style>

<style name="myCustomMenuTextApearance" parent="@android:style/TextAppearance.Widget.IconMenu.Item">
<item name="android:textColor">@drawable/text_selector</item>
</style>


<style name="AppTheme.Base" parent="@style/Theme.AppCompat.Light.DarkActionBar" />

<style name="MySearchViewStyle" parent="Widget.AppCompat.SearchView">
<item name="searchIcon">@android:color/transparent</item>
<item name="closeIcon">@drawable/ic_close_white_24dp</item>
</style>

<style name="MessagesListActionMode" parent="Widget.AppCompat.ActionMode">
<item name="background">@color/toolbar_am_bg</item>
<item name="android:background">@color/toolbar_am_bg</item>
<item name="android:height">56dp</item>
<item name="android:titleTextStyle">@style/ActionModeTitle</item>
</style>

<style name="ActionModeTitle" parent="TextAppearance.AppCompat.Widget.ActionMode.Title">
<item name="android:textColor">@color/actionbar_text_color</item>
<item name="android:textSize">@dimen/font_20pt</item>
<item name="android:textStyle">normal</item>
<item name="fontFamily">@string/font_roboto_medium</item>
</style>

<style name="TestStyle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorAccent">@color/color2</item>
</style>

<style name="CurrentTheme.Widget" />

<style name="CurrentTheme.Widget.SocialButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginRight">5dp</item>
<item name="android:layout_marginLeft">5dp</item>
</style>

<style name="OtherMail.floating_text_view" parent="android:style/Widget.TextView">
<item name="android:textSize">@dimen/font_12pt</item>
<item name="android:textColor">@color/color4</item>
</style>

<style name="OtherMail.edit_text" parent="android:style/Widget.EditText">
<item name="android:textSize">@dimen/font_16pt</item>
<item name="android:singleLine">true</item>
<item name="android:background">@drawable/textedit_bg_state</item>
<item name="android:textColor">@color/color7</item>
<item name="android:textColorHint">@color/color7</item>
</style>
</style>

等等。

如果正确答案我应该给你更多信息,告诉我。

最佳答案

我发现支持库版本不正确的库。我在其中排除了支持库组(示例this)(或者我可以删除该库或更新它),但它对我不起作用,我更新库并且(但排除也应该起作用,我认为)我的项目被建。

问题:
抛出错误的库如下所示:
enter image description here
我的日志没有向我显示问题出在哪里(间接地,在生成的文件中提到了机器人)。

决定:
1)您可以排除引发错误的组:
enter image description here
2)或更新它:
enter image description here

我希望我的回答对某人有所帮助。

关于Android Support Library Build v26.X.X Build Error : Attribute “fontFamily” already defined with incompatible format,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53778675/

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