본문 바로가기

Snippets

[Android] apk 빌드시 파일 네임 변경하기.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

android studio에서 apk 빌드시 기본으로는 apk-debug.apl , apk-release.apk 파일명으로 생성된다. 이 파일명이 싫다면 다음과 같이 설정한다.


app/build.gradle 파일을 열고 android -> buildTypes에 다음을 추가한다.


android {

    ...


    buildTypes {

...


       applicationVariants.all { variant ->

            variant.outputs.all {

                outputFileName = "MYAPP-${variant.versionName}.apk"

            }

        }

    }

...

}