我知道这是一个常见的问题,但我已经尝试了
right click existing task -> new -> subtask
中添加Base.
并且这些都不能解决问题。似乎这次问题出在其他地方,因为所有元素都是最新的。
我在Android Studio的预览屏幕上收到以下错误:
styles.xml
Gradle版本是1.2.3。我刚刚安装了Android Studio + SDK。
构建gradle:
The following classes could not be found:
- android.support.v7.widget.Toolbar
和
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
答案 0 :(得分:0)
您正在使用支持库中的工具栏,但似乎您并未将其作为依赖项包含在内。你应该在build.gradle文件中添加这样的东西:
dependencies {
compile 'com.android.support:support-v4:22.1.1'
compile 'com.android.support:appcompat-v7:22.1.1'
}