WORK/Android

[Android] Jack server 빌드 에러

호이호이호잇 2021. 5. 11. 18:30
728x90
반응형

안드로이드 빌드하다보면 가끔 발생하는 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 에러 ㅠ 이제 멈춰~~!

728x90
반응형