Android Studio (3.1.4) Rendering Problems for Design + Blueprint

Viewed 5286

This is a default starter project. No new codes were written yet. The image says it all:

enter image description here

Android SDK Manager: enter image description here

build.gradle(Module:app)

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "chatchattan.nooguiquirks.com.chatchattan"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:recyclerview-v7:28.0.0-rc01'
}

I think I've downloaded the necessary SDK (28) for this. Even tried downgrading to API 24,25 to see if it changes anything but the Design and Blueprint rendering preview doesn't work.

Tried Solutions:

  1. Make sure your Android SDK is updated to that of your build.gradle

  2. Clean Project

  3. Invalidate Cache/Restart

  4. Use App Theme

STILL NOTHING!

Any bright ideas? : )

5 Answers

Just Follow below step and good to go

1 Open design layout window tap on App Theme Top

enter image description here

2 Change theme to material light

enter image description here

Add Base at the styles.xml

<!-- Base application theme. -->
<style name="AppTheme" parent="Base.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>

you must change in module:app

    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'

with this :

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

Then sync it

    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:recyclerview-v7:28.1.1'
}

There are some bugs at latest support library version

So solution change android support library version to 28.0.0-alpha1

Or back to use 27 SDK Version

Related