【发布时间】:2016-04-26 04:51:29
【问题描述】:
我正在使用 Android Studio,我想使用 Marshmallow API 和 AppCompatActivity。当我创建一个新项目时,build.gradle 包含以下几行,但我在 R 类中收到错误,上面写着 not a symbol。
请让我知道如何更正build.gradle 以使应用程序正常工作。
分级
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.com.myapplication"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
}
【问题讨论】:
-
发布你在构建 gradle 时收到的错误消息
标签: android android-studio gradle android-gradle-plugin