android2018. 6. 18. 15:18


#1 app/build.gradle을 아래와 같이 수정

android {
//APK 이름 명시적으로 변경하기
def APP_NAME = "Text Animation"

compileSdkVersion 26

defaultConfig {
applicationId "com.overface.learningandroid"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

//APK 이름 명시적으로 변경하기
archivesBaseName = APP_NAME
}
}

#2


buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

/**
* variant.name : release, debug build variants 에 설정된 target
* variant.versionName : defaultConfig 에 정의된 versionName
*/
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = APP_NAME + "${variant.name}-${variant.versionName}.apk"
}
}
}
}

출처 :

http://overface.tistory.com/196

Posted by easy16