Failed to find style 'coordinatorLayoutStyle' in current theme In Android Studio 3.1
This happened due to use of alpha version SDK 28
We need to change the android { ... }
in "build.gradle" in app filecompileSdkVersion 28
to compileSdkVersion 27
targetSdkVersion 28
to targetSdkVersion 27
Also, try to change implementations likeimplementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
toimplementation 'com.android.support:appcompat-v7:27.1.1'
Hope this works!
For Android Studio v3.1.*, in addition we need change:implementation 'com.android.support:design:28.0.0-alpha3'
toimplementation 'com.android.support:design:27.1.1'
you can fix this issue by adding this script to the app module build.gradle
, in the android
section
configurations.all {resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == "com.android.support") { if (!requested.name.startsWith("multidex")) { details.useVersion "27.+" } } }}
This appears to be a bug in the current version of Android Studio (3.1.3) as I was encountering the same thing. I downloaded the beta build from here and opened my existing project and the errors disappeared.
https://developer.android.com/studio/preview/?utm_source=android-studio
Not exactly a fix but hopefully it will get you back up and running.