简体   繁体   English

Android Studio渲染问题

[英]Android Studio Render Issue

Alright, I have spent 3~ hours total trying to fix this issue, and I can't for the life of me figure it out. 好吧,我总共花了3个小时来解决这个问题,但我终生无法解决。 I'm trying to start programming in Android Studio and I'm following TheNewBostons tutorials. 我正在尝试开始在Android Studio中进行编程,并且正在关注TheNewBostons教程。 I've followed it exactly, and every time that I switch the theme to "Material.Light" I get a Rendering Issue. 我完全按照它进行操作,每次将主题切换为“ Material.Light”时,都会出现“渲染问题”。

Here's the issue: 这是问题所在:

Error Message 错误信息

I've tried several different fixes, like switching the renderer to a lower version of Android, editing styles.xml or something like that, and nothing has fixed it. 我尝试了几种不同的修复程序,例如将渲染器切换到较低版本的Android,编辑styles.xml或类似内容,但没有任何修复方法。

I've just started a new project, and haven't done a single thing. 我刚刚开始一个新项目,但还没有做任何事情。 Does anyone have any light they can shed on this? 有没有人可以阐明这一点?

You are using the Support Design Library, and when you use the design library you must use a theme that extends Theme.AppCompat , as the error message says: 您正在使用支持设计库,并且在使用设计库时,必须使用扩展Theme.AppCompat的主题,因为错误消息显示:

You need to use a Theme.AppCompat theme (or decendant) with the design library.

So instead of selecting Material.Light , rather select Appcompat.Light . 因此, Appcompat.Light选择Material.Light ,不如选择Appcompat.Light

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

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