Theme Error - how to fix?

后端 未结 2 1598
别那么骄傲
别那么骄傲 2020-11-29 13:48

Tried Many Solution But No Helped

Ref : Failed to find style 'coordinatorLayoutStyle' in current theme

But not Helped

Render

相关标签:
2条回答
  • 2020-11-29 14:30

    This error was occurred in your Rendering Layout which is a part of Studio Not in any files or Library

    1. Try adding "Base" before Theme in styles.xml as show : - "Base.Theme.AppCompat.Light.DarkActionBar"

    2. Please restart Android Studio by selecting the menu option "File" → "Invalidate Caches / Restart"

    3. Workarounds: Try rendering with M preview using AS v1.3 preview OR use FrameLayout for designing and change to android.support.design.widget.CoordinatorLayout while debugging.
    0 讨论(0)
  • 2020-11-29 14:35

    This is a bug in 28.0.0 and the only fix(workaround) is adding this to your Build.gradle:

    configurations.all {
            resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                def requested = details.requested
                if (requested.group == "com.android.support") {
                    if (!requested.name.startsWith("multidex")) {
                        details.useVersion "27.1.1"
                    }
                }
            }
        }
    

    Which somehow, this bypasses the issue and uses 27 support library for that. Otherwise, you may wanna update your Android Studio to canary channel version or using backward support library like 27.1.1 or etc.

    0 讨论(0)
提交回复
热议问题