渲染问题下面类找不到:android.support.v7.internal.app.WindowDecorActionBar [英] Rendering Problems The following classes could not be found: android.support.v7.internal.app.WindowDecorActionBar

查看:570
本文介绍了渲染问题下面类找不到:android.support.v7.internal.app.WindowDecorActionBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么原因导致Android Studio中?

布局preVIEW以下错误

  

渲染问题找不到以下类:
   - android.support.v7.internal.app.WindowDecorActionBar(修正构建路径,创建类)
  提示:尝试打造该项目。



解决方案

在ActionBar已经去precated和工具栏所取代。话虽这么说,你可以做下面的,如果你想继续使用的ActionBar现在:


  1. 在res文件夹里面的值文件夹中打开styles.xml。

  2. 字的基础的加入主题名称的开头,以便它读取Base.Theme.AppCompat.Light.DarkActionBar

今天我有同样的问题,这个解决方案为我工作。仅供参考我Android Studio中,虽然,但希望该解决方案是Eclipse类似。

FYI这里是使用工具栏替换动作条,当你准备做这样一个体面的博客文章:<一href=\"https://blog.xamarin.com/android-tips-hello-toolbar-goodbye-action-bar/\">https://blog.xamarin.com/android-tips-hello-toolbar-goodbye-action-bar/

What causes the following error in the layout preview in Android Studio?

Rendering Problems The following classes could not be found: - android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class) Tip: Try to build the project.

解决方案

The Actionbar has been deprecated and replaced by Toolbar. That being said, you can do the following if you want to continue using Actionbar for now:

  1. Open styles.xml in the values folder inside the res folder.
  2. Add the word Base to the beginning of the theme name so that it reads "Base.Theme.AppCompat.Light.DarkActionBar"

I had the same issue today and this solution worked for me. FYI I am in Android Studio though, but hopefully the solution is similar for Eclipse.

FYI here is a decent blog post on replacing the Actionbar with the Toolbar for when you are ready to do so: https://blog.xamarin.com/android-tips-hello-toolbar-goodbye-action-bar/

这篇关于渲染问题下面类找不到:android.support.v7.internal.app.WindowDecorActionBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆