首页 > 解决方案 > Android Studio 设计视图未正确显示

问题描述

我查看了许多站点以及 Stack Overflow 上提供的建议。我的 Android Studio 一切正常,除了设计视图不显示任何内容。我可以手动拖放小部件或修改 XML 代码,文本会得到很好的更新,但这些更改并没有在设计或蓝图上注册。我尝试过删除并重新安装 IDE、更改 SDK 版本、进行构建-> 清理、重置缓存以及添加依赖项。下面是我的 build.gradle 任何有批判眼光的人有建议吗?我不知道我在做什么。

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
    applicationId "com.mydrinkmixer.somerestaurant.mydrinkmixer"
    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-rc02'
     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'
}

标签: androidgradledependencies

解决方案


推荐阅读