1

I have created an app in android studio in ubuntu. Now I have moved the project to Windows 10. I have updated the studio now. The styles.xml resources are unable to identify the themes given in the parent attribute(all of them).

This is my styles.xml file

<!-- 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>

All the parent attributes are showing that symbol cannot be resolved.

shubhamjuneja
  • 395
  • 1
  • 5
  • 16
  • that's because of feature called "build cache". see my answer here: https://stackoverflow.com/a/42765120/1148784 – babay Aug 16 '17 at 01:40

1 Answers1

0

Are you sure, that the Android SDK version is the same as on your Ubuntu system? I am not sure if it is an issue with Android studio itself or the SDK. Did you also try to rebuild the project? Internal IDE parsing errors are not always reliable

  • Sdk version is diiferent. Now what should I do to get it working? – shubhamjuneja Feb 07 '17 at 20:24
  • Sorry I didn't get you.You want me to install old sdk version or something else? – shubhamjuneja Feb 07 '17 at 20:30
  • You need the corresponding API version of Android to use your styles. If you compare it with your SDK on Ubuntu there must be a certain API level (ex v24) and also others I guess, and you also need them on Windows, installable via SDK Manager – Andreas Lehner Feb 07 '17 at 20:32