找不到以下类:android.support.v4.widget.DrawerLayout [英] Following classes not found: android.support.v4.widget.DrawerLayout

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

问题描述

我是工作在Android Studio中的一个项目中,我不得不使用导航抽屉里,一切都运行良好。最近Android的工作室升级到1.2版本,突然,其中资产净值抽屉停止呈现给我的错误活动。

I was working on a project in Android Studio in which I had to use a navigation drawer, everything was running well. Recently Android Studio updated to 1.2 version and suddenly the activity where the the nav drawer was stopped rendering giving me that error.

我知道这是一个已知的错误和之前发生在我身上,但这次我不能把它修好。

I know that it is a known error and it happened to me before, but this time I can´t get it fixed.

的依赖项设置是这样的:

The dependencies are set like this:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:22.1.0'
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'com.google.android.gms:play-services:7.0.0'
}

所以,我认为他们是最新的,都没有问题。如果我创建另一个项目,导航抽屉它并没有给这个错误,虽然

So I think they are up to date and are not the problem. If I create another project with a navigation drawer it does not give that error though.

在此先感谢!

编辑:

针对Android工作室的更新已经发布昨天在理论上解决布局呈现的问题。安装了它,摇篮版本更新,同步和问题仍然存在!我好苦恼,现在,我不能甚至创造一个新的空白导航抽屉的活动,它说,它不容找到它并不会渲染。

An update for Android Studio has been released yesterday that in theory resolves layout rendering problems. Installed it, Gradle version updated and sync and the problem continues!! Im so upset right now, I can´t even create a new blank nav drawer activity, it says it can´t find it and won't render.

推荐答案

我回答自己,因为它是一个漫长的时间,因为这个问题,似乎没有人有这个问题。有这个无解的,奇怪的是Android的工作室在某种程度上并写入一个文件,在另一个完全wasn't工作作品完全相同code变了,所以我必须在一个新的项目,以重写整个程序和现在的问题是没有了。根本就没有的,为什么更新后它不能够在该项目正常读取类的答案,所以我不得不反正把它删除,谢谢!

I'm answering myself because it's been a long time since the question and seems that nobody had this problem. There was no solution for this, strangely Android Studio changed in some way and the exactly same code written in one file that wasn´t working works perfectly in another, so I had to rewrite the entire program in a new project and the problem is gone now. There was simply no answer of why after the update it couldn´t read the classes properly in that project so I had to delete it, thanks anyway!!

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

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