After updating support library version 27.1.0
Android Studio unable to render CardView. It shows error message as
failed to find style 'cardView Style' in current theme
But no error in compiling and no difference while seeing on the phone.
I have reverted the support library version to 27.0.2
and it's rendering fine.
The issue with support library or Android studio? How to fix this?
App Level Gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.tmmmt.tmmmt"
minSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
buildConfigField 'String', 'FS_CLIENT_ID', FOURSQUARE_CLIENT_ID
buildConfigField 'String', 'FS_CLIENT_SECRET', FOURSQUARE_CLIENT_SECRET
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
buildConfigField 'String', 'FS_CLIENT_ID', FOURSQUARE_CLIENT_ID
buildConfigField 'String', 'FS_CLIENT_SECRET', FOURSQUARE_CLIENT_SECRET
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "default"
productFlavors {
dev {
dimension "default"
versionNameSuffix "-dev"
buildConfigField 'String', 'BASE_URL', BASE_URL_DEV
manifestPlaceholders = [GEO_API_KEY: GOOGLE_MAP_KEY_DEV]
}
beta {
dimension "default"
versionNameSuffix "-beta"
buildConfigField 'String', 'BASE_URL', BASE_URL_BETA
manifestPlaceholders = [GEO_API_KEY: GOOGLE_MAP_KEY_BETA]
}
live {
dimension "default"
buildConfigField 'String', 'BASE_URL', BASE_URL_LIVE
manifestPlaceholders = [GEO_API_KEY: GOOGLE_MAP_KEY_LIVE]
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.anko:anko-common:$anko_version"
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support:support-v13:$support_version"
implementation "com.android.support:design:$support_version"
implementation "com.android.support:cardview-v7:$support_version"
implementation "com.google.firebase:firebase-messaging:$play_version"
implementation "com.google.android.gms:play-services-maps:$play_version"
implementation "com.google.android.gms:play-services-location:$play_version"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.tmmmt.library:arrowtab:1.3'
implementation 'com.github.stfalcon:chatkit:0.2.2'
implementation 'com.amazonaws:aws-android-sdk-core:2.6.16'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.6.16'
implementation 'com.amazonaws:aws-android-sdk-s3:2.6.16'
implementation 'com.orhanobut:logger:2.1.1'
implementation 'com.tmmmt.library:animations:0.6'
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
compile('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
/*Fort*/
implementation project(':FortSDKv1.4.1')
implementation 'com.victor:lib:1.0.1'
implementation 'com.shamanland:fonticon:0.1.8'
implementation('com.nispok:snackbar:2.11.0') {
exclude group: 'com.google.android', module: 'support-v4'
}
implementation 'com.google.guava:guava:23.0-android'
implementation 'org.bouncycastle:bcprov-jdk16:1.46'
implementation 'commons-codec:commons-codec:1.10'
/*Fort*/
}
apply plugin: 'com.google.gms.google-services'
Project Level Gradle:
buildscript {
ext.kotlin_version = '1.2.30'
ext.anko_version = '0.10.1'
ext.support_version = '27.1.0'
ext.play_version = '11.8.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.realm:realm-gradle-plugin:4.3.2"
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://mymavenrepo.com/repo/eDGOo6Dqr4f6uNA0HoWX/"
credentials {
username = 'myMavenRepo'
password = 'tmmmt123'
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Update:
There is no such error from Android Studio 3.2
. The error was gone completely.