728x90
반응형
안드로이드 빌드 시 Cause: android.defaultConfig.versionCode is set to 0, but it should be a positive integer. 에러 발생,.
gradle파일에 선언된 versionCode와 versionName을 설정 안해주어서 생기는 에러
defaultConfig {
applicationId "com.example.test"
minSdkVersion rootProject.ext.minApi
targetSdkVersion rootProject.ext.targetApi
vectorDrawables.useSupportLibrary = true
// versionName = androidGitVersion.name() // <--- 여기에 버전 이름 ex) 1.0.0
// versionCode = androidGitVersion.code() // <--- 여기에 버전 코드 ex) 1
versionName = "1.0.0"
versionCode = 1
}
코드를 수정하고 앱을 업데이트 하기 위해 apk나 abb 파일 만들 때 versioncode를 1씩 상승시켜주어야함.
728x90
반응형