[英]Android values.xml error while building
我有一個項目,一直運作良好。 我將buildToolsVersion更改為“ 26.0.0”,現在當我嘗試清理/重建項目時,在“ values.xml”中收到以下錯誤。
錯誤:(343)屬性“字體”已使用不兼容的格式定義。 錯誤:(319)此處定義了原始屬性。 錯誤:任務':app:processDebugResources'的執行失敗。
com.android.ide.common.process.ProcessException:無法執行aapt
原始屬性值:
<declare-styleable name="CustomFontTextView"><attr format="string" name="font"/></declare-styleable>
屬性“字體”已使用不兼容的格式定義:
</attr><attr format="reference" name="font"/><attr format="integer" name="fontWeight"/></declare-styleable>
我的主要活動中也無法解決“ R”錯誤。
有什么想法可能有什么問題嗎?
謝謝。
更改在CustomFontTextView中使用的“字體”屬性名稱
<declare-styleable name="CustomFontTextView">
<attr format="string" name="font"/>
</declare-styleable>
至
<declare-styleable name="AATextView">
<attr format="string" name="typeface" />
</declare-styleable>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.