Android Studio 无法预览xml布局视图

在build.gradle里把依赖API28改为26即可: 把

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.clkj.surveytest"
        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'
        }
    }
}

将28修改成26即可

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

你可能感兴趣的:(Android Studio 无法预览xml布局视图)