渲染问题,找不到android.support.v4.widget.Drawerlayout [英] Rendering problems, could not find android.support.v4.widget.Drawerlayout

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

问题描述

我已经尝试了SO中的每个解决方案,但是我的问题仍然没有解决.以下是我遇到的错误:

I have tried each and every solution from the SO, but my problem still isn't solved. Following is the error I am getting:

找不到以下类: -android.support.v4.widget.DrawerLayout(修复构建路径,创建类) 提示:尝试构建项目.

The following classes could not be found: - android.support.v4.widget.DrawerLayout (Fix Build Path, Create Class) Tip: Try to build the project.

我只是将此android项目导出到android studio(1.2) . 我已经应用了解决方案以及许多其他解决方案,但是没有成功.

I am just exporting this android project into android studio(1.2). I have applied this solution and many other , but with no success.

推荐答案

每当您使用自定义"视图(无论是第三方库视图还是Google自己的DrawerLayout)时,Android Studio的XML编辑器预览都会向您显示该错误,因为您已经经历了自己.

Android Studio's XML editor preview will give you that error whenever you use a "custom" view - be it third-party library views or Google's own DrawerLayout, as you've experienced yourself.

但是不要担心,该错误只会显示在XML预览上,您的项目应该可以正常编译.继续尝试. :)

But fear not, that error will only be shown on the XML preview, your project should compile just fine. Go ahead and try. :)

希望这对您有帮助!

ps ,在编辑器上切换API级别(如此处的答案所建议)有助于解决常规"内置视图的API 22呈现错误,但不能解决DrawerLayout的问题.或其他任何第三方视图.

p.s., Switching API level on the editor (as suggested by an answer here) helps fix API 22 rendering error for "normal" in-build views, but not for DrawerLayout or any other third-party views really.

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

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