Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- 백준
- 우테캠
- 안드로이드#안드로이드 스튜디오
- 14501번
- 코틀린#비트연산
- 퇴사
- Android
- 13458번
- 플러터
- 데이터베이스#DB#DBMS
- 카카오
- 소셜로그인
- 7기
- 42서울#42Seoul#라피신
- 알고리즘
- kakao
- dp
- 우아한테크캠프
- 엑티비티
- activity
- 안드로이드#flutter#앱배포
- 안드로이드
- Flutter
Archives
- Today
- Total
nonani
Flutter 앱 배포 - (1) 본문
공모전을 준비하면서 앱을 직접 배포해보게 되었다. 앱 배포 절차에 대해 알아보자
개발 환경은 Mac OS이다.
요약
- jks file 생성
- build.gradle 설정
- release APK/ABB 생성
Generating jks file
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
위의 코드를 터미널에 입력하면 초기 비밀번호를 설정하라는 명령어가 뜨고 몇몇 질문에 답변을 입력해주면 된다. 자신의 이름, 소속 등을 물어본다.
이후에는 key.jks 파일이 생성되는 것을 확인할 수 있을 것이다. 이를 android/app/ 경로로 옮겨준다.
이후 같은 경로에 key.properties 파일을 만들어주고 아래와 같이 입력해준다.
storePassword=<내가설정한password>
keyPassword=<내가설정한password>
keyAlias=key
storeFile=./key.jks
build.gradle 설정
android/app/build.gradle 파일을 찾아서 아래와 같이 코드를 수정해준다.
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('app/key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
// ....
// ....
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
}
}
release APK/ABB 생성
터미널에 flutter build appbundle 입력
마무리
그러면 끝이다. 쉽다.
'flutter' 카테고리의 다른 글
소셜 로그인 - 카카오 (1) (0) | 2022.12.15 |
---|