Android/Apk build 9

[android] Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3)

기존의 잘 빌드되는 코드에서 다음과 같은 에러가 발생하였다. Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3).Searched in the following locations: https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.3/runtime-1.0.3.aar 특히 맥북에서만 발생하여 구글링을 하여보았다. 원인 : google() 저장소를 찾지 못하여 발생. 해결방법 : google() 저장소를 추가해주거나 코드 위치를 아래와 같이 repositiories에서 가장 위로 배치 시켜준다. 유의사항 : google() 저장소는 gradle plugin 3.1.3이상에서 지원. ..

Android/Apk build 2018.07.22

[android] api, aar파일명 변경(version정보 포함)

aar파일명 변경 gradle plug-in 3.0- 이하버전 gradle plug-in 2.3.3 ,gradle 3.3에서 진행android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 19 targetSdkVersion 25 versionCode 7 versionName "1.0.8" archivesBaseName = "dabom_video_module" version = android.defaultConfig.versionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } libraryVariants.all ..

Android/Apk build 2018.03.29

[android] Proguard 유의사항

Proguard를 적용하고 난 후에만 DTO, VO, POJO라고 불리는 클래스들이 데이터를 받아 오지 못하는 현상 발생. Gson을 사용하여 jsonArray안의 jsonObject를 파싱하는 코드이다.Type listType = new TypeToken() {}.getType(); List list = gson.fromJson(jsonObjecInJsonArray, listType);jsonArray가 담기는 list의 사이즈는 서버에서 보내준대로 잘 받아왔지만 list의 요소인 jsonObject의 값들은 null로 받아오지 못하였다. JsonAfTvHotIssue의 변수 이름은 json key값들로 이루어져 있는데 Proguard를 통해 변수명이 변경되어서 값들을 받아오지 못한다. 해결방법 pro..

Android/Apk build 2018.03.24

[android] APK에 자동으로 서명하도록 빌드 프로세스 구성

안드로이드 스튜디오 apk의 자동으로 서명하도록 설정하는 방법. https://developer.android.com/studio/publish/app-signing.html#sign-auto 빌드 파일에서 서명 정보 제거 ( 파일에서 가저온다 ) https://developer.android.com/studio/publish/app-signing.html#secure-shared-keystore 빌드 파일에서 서명 패스워드 정보 제거 ( 환경변수에서 가져오거나 커맨드라인 빌드시 넘겨준다 ) https://developer.android.com/studio/build/build-variants.html#signing

Android/Apk build 2018.03.21