我在ubuntu的android studio中创建了一个应用程序。现在我已将项目移至Windows 10.我现在更新了工作室。 styles.xml资源无法识别父属性(所有这些)中给出的主题。
这是我的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 :(得分:0)
您确定Android SDK版本与Ubuntu系统上的相同吗?我不确定这是Android studio本身或SDK的问题。您是否也尝试重建项目?内部IDE解析错误并不总是可靠的