user9986946
user9986946

Reputation:

Cannot resolve symbol '@style/Widget.Design.CoordinatorLayout'

I'm using the latest version of Android Studio (3.1.3) with build tools 28.

The layout does not get rendered in the design tab when I'm using coordinator layout. Many have pointed out that to get around this problem is to add the following lines in the style.xml:

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

However adding the lines produces the following error: Cannot resolve symbol '@style/Widget.Design.CoordinatorLayout'.

Is there away to get around this issue?

Upvotes: 5

Views: 5926

Answers (4)

mig_e
mig_e

Reputation: 141

Try (API 28)->

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

Upvotes: 14

Aram Sargsyan
Aram Sargsyan

Reputation: 31

Try this: @style/Widget.Support.CoordinatorLayout

Upvotes: 3

Cur1osity
Cur1osity

Reputation: 51

This works in my version of studio (3.1.3):

Change this 2 lines in your gradle app file (build.gradle)

implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'

and resync.

Delete line

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

if you still have it in your styles.xml file.

Upvotes: 5

GParekar
GParekar

Reputation: 1219

I Hope this will work for you.

 implementation 'com.android.support:design:27.1.1'

add above line in app gradle file and instead of 27.1.1 use your library version(i.e 28.x.x)

Upvotes: 0

Related Questions