2017-02-07 59 views
0

我在ubuntu的android studio中創建了一個應用程序。現在我已經將該項目移至Windows 10.我現在已經更新了該工作室。 styles.xml資源無法識別父屬性(所有這些屬性)中給出的主題。Styles.xml不能在android studio中工作

這是我styles.xml文件

<!-- Base application theme. --> 
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> 
    <!-- Customize your theme here. --> 
    <item name="colorPrimary">#f44336</item> 
    <item name="colorPrimaryDark">#e53935</item> 
    <item name="colorAccent">#f44336</item> 
    <item name="showcaseViewStyle">@style/CustomShowcaseTheme</item> 
</style> 

<style name="AppTheme.NoActionBar"> 

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

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"> 

</style> 

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"> 

</style> 

<style name="checkbox" parent="Theme.AppCompat.Light"> 
    <item name="colorControlNormal">@color/black</item> 
    <item name="colorControlActivated">@color/black</item> 
</style> 



<style name="layoutmargin"> 
    <item name="android:layout_marginTop">20dp</item> 
    <item name="android:background">@color/white</item> 
    <item name="android:layout_marginLeft">20dp</item> 
    <item name="android:layout_marginRight">20dp</item> 
</style> 


<style name="CustomShowcaseTheme" parent="ShowcaseView.Light"> 
    <item name="sv_backgroundColor">#90234A56</item> 
    <item name="sv_buttonBackgroundColor">#CF3119</item> 
    <item name="sv_buttonText">Close</item> 
    <item name="sv_titleTextAppearance">@style/CustomTitle</item> 
    <item name="sv_detailTextAppearance">@style/CustomDetailText</item> 
</style> 
<style name="CustomTitle" parent="TextAppearance.ShowcaseView.Title"> 
    <item name="android:textColor">#FFFFFF</item> 
    <item name="android:textSize">30dp</item> 
    <item name="android:textStyle">bold</item> 
</style> 

<style name="CustomDetailText" parent="TextAppearance.ShowcaseView.Detail"> 
    <item name="android:textColor">#FFFFFF</item> 
    <item name="android:textSize">20dp</item> 
    <item name="android:textStyle">italic</item> 
</style> 

所有父屬性顯示,符號不能得到解決。

+0

這是因爲稱爲「構建緩存」的功能。看到我的答案在這裏:https://stackoverflow.com/a/42765120/1148784 – babay

回答

0

您確定Android SDK版本與您的Ubuntu系統相同嗎?我不確定這是Android Studio本身還是SDK的問題。你也嘗試重建項目嗎?內部IDE解析錯誤並不總是可靠的

+0

Sdk版本是不同的。現在我該怎麼做才能使它工作? – secretcoder

+0

使用SDK管理器進行安裝。 –

+0

對不起,我沒有得到你。你想讓我安裝舊的SDK版本或其他東西? – secretcoder

相關問題