找不到Android工具栏类

Ada*_*rsh 13 android android-xml android-studio android-toolbar

我今天将Android Studio升级到1.2,我收到了这个错误.

找不到以下类:android.support.v7.widget.Toolbar(修复构建路径,创建类)

我的build.gradle包含以下依赖项

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:cardview-v7:22.1.1'
    compile 'com.android.support:recyclerview-v7:22.1.1'
    compile 'com.android.support:appcompat-v7:22.1.1'
}
Run Code Online (Sandbox Code Playgroud)

有人请帮我解决这个问题吗?

Ed *_*rge 2

这个问题(偶尔)可以通过使缓存失效来解决

File > Invalidate Caches / Restart > Invalidate and Restart
Run Code Online (Sandbox Code Playgroud)

见下文:

使缓存无效