简体   繁体   English

如何在Android Studio布局预览中忽略“渲染问题”?

[英]How to ignore 'Rendering Problems' in android studio layout preview?

I have some views that couldn't be instantiated, which is really annoying: 我有一些无法实例化的视图,这确实很烦人:

渲染问题

How could I resolve this issue? 我该如何解决这个问题? or even just ignore if there is no way to resolve it 甚至忽略是否没有办法解决它

如果添加新库,请尝试重建项目,然后刷新布局预览。

Change your api level appropriate your Sdk 根据您的SDK更改您的API级别

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"
    defaultConfig {
        applicationId "com.example"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }

here where is red Circle. 这里是红色圆圈。

在此处输入图片说明

for example: if your sdk version is 24 set it to 24.. 例如:如果您的SDK版本为24,请将其设置为24。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM