Android Studio预览渲染 [英] Android Studio Preview Rendering
问题描述
我在Android Studio布局预览中遇到以下错误:
I am getting the following error in Android Studio layout preview :
Rendering Problems The following classes could not be found:android.support.v7.widget.Toolbar (Fix Build Path, Create Class)
Tip: Try to build the project."
我正在使用 Android Studio 1.3 预览版3.和buildToolsVersion"21.1.2",com.android.tools.build:gradle:1.3.0-beta1,compileSdkVersion 21.
I am using Android Studio 1.3 Preview 3 release. with buildToolsVersion "21.1.2", com.android.tools.build:gradle:1.3.0-beta1", compileSdkVersion 21.
该应用程序可以成功构建,并且可以在我的手机上完美运行.如何解决这个问题?请注意,问题不在于可能的重复项所指出的实例化.问题仅在于渲染,该应用程序的构建和运行没有问题.
The App builds successfully and runs perfectly on my phone though. How can solve this issue? Note that the problem is NOT of instantiation as pointed by the possible duplicate. The issue is only in rendering, the App builds and runs without issues.
推荐答案
转到styles.xml,您可以在其中找到类似的内容
Go to styles.xml, you can found there something like
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.Darkactionbar">
在"主题"之前添加"基础"到
<style name="AppBaseTheme" parent="Base.Theme.AppCompat.Light.Darkactionbar">
这就像是Android Studio中的错误
it's something like a bug in Android Studio
这篇关于Android Studio预览渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!