안드로이드 빌드하다보면 가끔 발생하는 Jack server 빌드 에러들과 해결법을 정리해두었습니다.
#1. Try 'jack-diagnose'
<Error message>
FAILED: /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.36.CANDIDATE.jar 3.36.CANDIDATE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.7.BETA.jar 4.7.BETA || exit 47 )" Jack server already installed in "$(HOME)/.jack-server" Communication error with Jack server (58), try 'jack-diagnose' or see Jack server log Failed to contact Jack server: Problem reading $(HOME)/.jack-server/client.pem. Try 'jack-diagnose' Failed to contact Jack server: Problem reading $(HOME)/.jack-server/client.pem. Try 'jack-diagnose'
<해결법>
1. .jack-settings 파일에 옵션 추가 ($HOME 경로)
$ nano ~/.jack-settings
> JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g" 추가
2. .jack-server/config.properties 파일 설정 변경 (나는 없어서 안해줌)
$ nano ~/.jack-server/config.properties
> jack.server.max-service=4 -> 1
3. server stop and start (빌드하고 있었던 Android 경로에서)
$ ./prebuilts/sdk/tools/jack-admin kill-server ./prebuilts/sdk/tools/jack-admin start-server
(2021.08.03 추가)
위에 했는데도 동작을 안한다면, 해보기
4. /etc/java-8-openjdk/security/java.security 파일에 TLSv1, TLSv1.1 있는지 확인하고, 있다면 지워주기
#2. Jack server failed to (re)start
<Error message>
FAILED: setup-jack-server /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47 )" Jack server already installed in "$(HOME)/.jack-server" Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir="$(HOME)/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp "$(HOME)/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher Jack server failed to (re)start
<해결법>
$(HOME) 경로에 .jack-server 를 삭제하고 빌드 재 실행
jack server 에러 ㅠ 이제 멈춰~~!
'WORK > Android' 카테고리의 다른 글
[Android] KeyEvent 처리 | KeyEvent 순서 | Framework Key event (0) | 2022.04.25 |
---|---|
[Android] 화면 OFF 상태에서 Key Event 받기 | AcessibilityService 상속 서비스 | KeyEvent 서비스 | 접근성 서비스 (0) | 2022.04.01 |
[Android] storage 접근 권한 요청, 처리 (0) | 2021.04.13 |
[Android] 안드로이드 제공 vector 이미지 추가 | 안드로이드 버튼 아이콘 추가 (0) | 2021.04.09 |
[Android] AndroidStudio Git 연동 (0) | 2021.04.07 |