【发布时间】:2017-06-22 16:02:08
【问题描述】:
有人请帮帮我.... 无法在额外属性扩展上获取属性“compileSdkVersion”,因为它在 android studio 中不存在。
【问题讨论】:
-
您可以通过复制应用级别 build.gradle 中 compileSdkVersion 的值并将其粘贴到库的 compileSdkVersion 中来消除此错误
标签: android
有人请帮帮我.... 无法在额外属性扩展上获取属性“compileSdkVersion”,因为它在 android studio 中不存在。
【问题讨论】:
标签: android
转到“项目文件”视图并打开构建 gradle。
你会发现这样的东西
// 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:2.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
你必须添加这个定义:
ext {
compileSdkVersion = 23
buildToolsVersion = "23.0.1"
targetSdkVersion = 21
}
【讨论】:
我刚刚通过删除解决了这个问题
apply plugin: 'android-reporting'
一切正常!
【讨论】: