当前位置: 代码迷 >> 综合 >> Android Jack-Server多用户编译时jack-server错误Communication error with Jack server (60), try 'jack-di
  详细解决方案

Android Jack-Server多用户编译时jack-server错误Communication error with Jack server (60), try 'jack-di

热度:22   发布时间:2023-12-11 22:52:15.0

错误

Communication error with Jack server (60), try 'jack-diagnose' or see Jack server log
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/leo/.jack-server"
Communication error with Jack server (77), try 'jack-diagnose' or see Jack server log
Failed to contact Jack server: Problem reading /home/leo/.jack-server/server.pem. Try 'jack-diagnose'
Failed to contact Jack server: Problem reading /home/leo/.jack-server/server.pem. Try 'jack-diagnose'
[  0% 76/33166] target Executable: trunks_test (out/target/product/angler/obj/EXECUTABLES/trunks_test_intermediates/LINKED/trunks_test)
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] 错误 1

错误组件

jack-server无法连接,它可能正在被服务器内的其他用户使用。

解决

  1. ps aux | grep jack-server
    找到对应的PID,把它杀掉(确认安全)。
  2. 进入prebuilts/sdk/tools重新安装jack-server
./jack-admin stop-server; ./jack-admin uninstall-server;./jack-admin install-server    jack-launcher.jar  jack-server-4.8.ALPHA.jar

安装、启动成功的打印:

Stopping background server
No Jack server running. Try 'jack-admin start-server'
Removing jack server from "/mnt/zhonghongyu/.jack-server"
nstalling jack server in "/mnt/zhonghongyu/.jack-server"
  1. 开始编译即可
  相关解决方案