도리안의 개발 이야기 #102 - GCM에서 FCM으로 마이그레이션 작업 중 (2)

in #kr-dev5 years ago (edited)



대문 제작: imrahelk

그제(월) 일찍 퇴근했고 어제(화)도 늦지 않게 퇴근할 것으로 기대를 했으나... 뜻하지 않은 문제를 만나면서 야근을 하게 되었어요. 낮에는 스프링 서버의 FCM 메시지 전송 작업이 완료되었습니다. FCM은 아니지만 앱에서 GCM 리시버로 메시지를 받는 것도 확인했습니다. 남은 거는 앱에 FCM 마이그레이션을 적용하는 것이었죠. 여기서 생각하지 못한 난적을 만났습니다. 그거는요... Firebase 관련 모듈들의 버전 문제로 보였습니다.

담당 앱에 FCM 마이그레이션을 먼저 적용한 분이 자료를 정리해 준 게 있었습니다. 그거를 참고하여 앱 수정을 진행하고 있었어요. 문제는요...

build.gradle 오류 - All firebase libraries must be either above or below 14.0.0

dependencies {
    //...
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
}

apply plugin: 'com.google.gms.google-services'

위와 같이 app 모듈의 build.gradle 파일에 Firebase 관련 implementation을 추가하면, 아래와 같은 오류가 발생합니다.

All firebase libraries must be either above or below 14.0.0

위 오류에 대해 검색해 보았으나, 뾰족한 해결방법은 찾을 수 없었습니다.


빌드 오류 - class file for com.google.android.gms.internal.zzbgl not found

apply plugin: 'com.google.gms.google-services'

build.gradle 파일에서 위 라인을 제거하고 SYNC를 실행해 보았습니다.

Executing tasks: [:app:generateDebugSources]

:app:checkDebugClasspath
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceDebug UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources

(중략)

:app:generateDebugSources

BUILD SUCCESSFUL in 6s
13 actionable tasks: 5 executed, 8 up-to-date

SYNC는 잘 된 듯 보입니다. 이번에는 빌드를 실행해 봅니다. 그 결과, 원인을 알 수 없는 오류가 또 발견되었습니다.

error: cannot access zzbgl
        Map<String, String> data = remoteMessage.getData();
                                                ^
  class file for com.google.android.gms.internal.zzbgl not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

클래스 이름이 zzbgl... 뜬금없어 보였죠. 저거는 라이브러리에 난독화가 적용되었기 때문인 거 같습니다. 이와 관련된 자료를 찾아보니 버전이 맞지 않아 생기는 문제라는 답들이 있습니다. 저마다 해결 방법이 달라서 어떤 것을 써야할지도 난감하지만요. 그 중 하나를 선택해봐도 속시원하게 해결이 되지 않았습니다.


퇴근하고...

원래는 어제 밤까지 작업이 마무리 되어야 하는데, 못하고 밤늦게 집으로 왔습니다. 내일 아침에 출근하면요... 먼저 마이그레이션 한 분에게 도움을 요청해야죠. 하루하루 사는 게 쉽지가 않아요.

aaronhong_banner.jpg

Sort:  

개발자는 알수 없는 오류 수정하느라 야근하는 경우가 많아요. ㅠ ㅠ

오류 해결을 위해 오늘도 열심히 달려야죠. 아자아자~!

화이팅입니다. 버그없는 세상을 위해서~~~!!!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64038.60
ETH 3148.89
USDT 1.00
SBD 3.97