我收到此错误,如何修复它。 错误:(12,0)无法获取属性' versionCodeInt'关于额外属性扩展,因为它不存在
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode project.ext.versionCodeInt -> getting error this line
versionName version
}
答案 0 :(得分:0)
错误:(12,0)无法获取属性' versionCodeInt'关于额外的属性 扩展,因为它不存在
此错误意味着您尝试在模块级别的build.gradle中使用的变量versionCodeInt
未在Project的根级别的build.gradle文件中正确设置。
因此,请检查root build.gradle是否包含此类代码:
project.ext {
versionCodeInt = 2 // actually here should be your current version code
}
答案 1 :(得分:0)
试试这个,它为我工作
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}