android - Android Studio 渲染错误
问题描述
我在 android studio 3.1.3 中开始了一个项目,当我想在活动设计调色板中设计一些东西时,出现了问题!下图: 渲染错误
这是我的 gradle(Module: app) 代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.mohammad.myapplication"
minSdkVersion 14
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 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:28.0.0-alpha3'
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'
}
我想这可能会有所帮助:在我的 Sdk 文件夹中,在 build-tools 文件夹中,有两个文件夹 28.0.1 和 27.0.3
更新:
我尝试了这些,但一无所获:
- 使缓存无效/重新启动
- 将 alpha3 更改为 alpha1
- 在模拟器上运行(没有错误,运行良好)
解决方案
更改implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
为implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
推荐阅读
- c++ - 如何从链表C++的第k个元素返回信息
- java - 我无法将照片保存到 SD
- html - 液体轮播总是在最后添加一个空白的空图像
- amazon-web-services - Unexplained PUT requests to S3 bucket
- android - WebRtcAudioRecord.context 由泄漏金丝雀报告泄漏。怎么解决?
- html - 根据标题宽度保持表格宽度和列宽相同
- elasticsearch - 弹性搜索的开放发行版文档级安全性
- bash - 我需要创建一个将运行 byobu 的 bash 脚本,然后在后台继续运行并执行操作
- visual-studio - 如何在 cmake 中指定特定的 MSVC 编译器版本?
- c++ - 确保在所有异步读/写完成后调用一次 on_close() 的设计模式?