Reputation: 68
I updated my support build library to 26.x.x from 25.4.0 and i get
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.
I did to clean project->rebuild, invalidate and restart studio, remove prefix android from android:fontFamily(now just fontFamily in item), exclude modules from others libraries (there were conflicts).
My styles.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>
Etc.
If for right answer i should give you more information, tell me.
Upvotes: 0
Views: 485
Reputation: 68
I found the library which have incorrect support library version. I excluded support library group(Example this) inside it(or I could remove that library or update its), but it didn't work for me and I update library and(but exclude should work too, i think) my project was built.
Problem:
The library from which the error was thrown out is shown below:
My logs didn't show to me where was the problem(Indirectly, in the generated file there was a mention of roboto).
Decisions:
1) You can exclude group which throws error:
2) Or update it:
I hope my answer will help someone.
Upvotes: 1