2013-02-01 38 views

回答

38

如果您所指的是TextViewandroid:fontFamily已添加到API級別16中,並且在較舊的設備上將不可用。您將Android構建目標(例如,Eclipse中的屬性> Android)設置爲API級別16之前的內容。

+0

你有沒有得到fontFamily屬性在任何配置中工作,對於任何構建? – larham1

+0

@ larham1:我沒有親自嘗試過。 – CommonsWare

+0

這個很棒。向上投票 – VVB

8

您將需要使用API​​ 16或更高版本進行編譯。

在命令行中使用--target 19或更高,如:

android update project --path . --name MyApp --target 19 

BTW:看到目標數字是如何匹配API號,使用android list targets

我希望有人認爲這有用的,因爲我花了數小時試圖解決以下錯誤:

Error: No resource found that matches the given name: attr 'android:fontFamily'

+0

+1努力。非常感謝 –

相關問題