0

I am fairly new to android and am trying to create an app in android studio The problem is the content_main.xml isn't working correctly. I used to be able to drag and drop button and such exactly where I wanted, but now I can't. My screen looks like :

enter image description here.

The errors I am getting are: Failed to find style 'coordinatorLayoutStyle' in current theme and two long errors that are shortened to missing styles and failed to instantiate one or more classes.

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>



<!--<style name="AppTheme.NoActionBar">-->
    <!--<item name="windowActionBar">true</item>-->
    <!--<item name="windowNoTitle">true</item>-->
<!--</style>-->

<style name="AppTheme.NoActionBar">
    <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>

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

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

Any help would be great all the other answers to similar questions seem to deal with previous versions and none of it has done the trick. Any help is very much appreciated.

Vishal Senjaliya
  • 454
  • 6
  • 21
bmurf17
  • 83
  • 7
  • Please add your styles xml files... Try this? https://stackoverflow.com/q/49292487/2308683 – OneCricketeer Jun 12 '18 at 00:43
  • I just tried that and it says "Cannot resolve symbol @style/Widget.Design.CoordinatorLayout" – bmurf17 Jun 12 '18 at 01:17
  • Are you compiling coordinator layout in gradle? If not, you could just define that theme. https://chromium.googlesource.com/android_tools/+/febed84a3a3cb7c2cb80d580d79c31e22e9643a5/sdk/extras/android/support/design/res/values/styles.xml#101 – OneCricketeer Jun 12 '18 at 03:11
  • @bmurf17 You can change downgrade OS version. http://prntscr.com/jtw6nm – Mayur Patel Jun 12 '18 at 04:09
  • Thank you changing the theme and layout is what did it – bmurf17 Jun 12 '18 at 21:56

0 Answers0