【发布时间】:2014-04-15 23:30:35
【问题描述】:
在我拥有的一个 Android 项目中,我在 build.gradle 文件中有此部分:
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 19;
}
}
在“minSdkVersion”和“targetSdkVersion”属性上,有警告:
'minSdkVersion' cannot be applied to '(java.lang.Integer)'
'targetSdkVersion' cannot be applied to '(java.lang.Integer)`
这是一个错误,还是别的什么?
【问题讨论】:
-
您所包含的代码部分没有任何问题。删除分号,但这不是问题的原因,它应该可以正常工作。 AFAIK 在 AS 中没有这样的错误,因此请包含您有问题的完整构建脚本。
-
删除;在targetSdkVersion之后
-
Android Studio 错误 code.google.com/p/android/issues/detail?id=65202 与 code.google.com/p/android/issues/detail?id=67013 重复
标签: android gradle android-studio build.gradle