当前位置: 代码迷 >> 综合 >> Android编译错误 Jack server failed to ,SSL error when connecting to the Jack server. Try ‘jack-diagnose‘
  详细解决方案

Android编译错误 Jack server failed to ,SSL error when connecting to the Jack server. Try ‘jack-diagnose‘

热度:70   发布时间:2023-11-27 12:17:44.0

一、编译android sdk 出现下面的错误 Jack server failed to (re)start,try 'jack-diagnose' or see Jack server log,SSL error when connecting to the Jack server. Try 'jack-diagnose'。

[ 10% 538/4980] Ensuring Jack server is installed and started
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/user/.jack-server"
Communication error with Jack server (35), try 'jack-diagnose' or see Jack server log
SSL error when connecting to the Jack server. Try 'jack-diagnose'
SSL error when connecting to the Jack server. Try 'jack-diagnose'
[ 10% 541/4980] build out/target/product/rk3399_mid/obj/ETC/precompiled_sepolicy_intermediates/precompiled_sepolicy
ninja: build stopped: subcommand failed.
22:32:18 ninja failed with: exit status 1#### failed to build some targets (01:11 (mm:ss)) ####Build android failed!

 二、网上大多都是说修改/home/user/.jack-server/config.properties  和 /home/user/.jack-settings里面的端口号,但是尝试多次还是编译失败。

 三, 分析error log: cd prebuilts/sdk/tools/ 然后执行./jack-admin dump-report 看log,有这样一行

* gnutls_handshake() failed: The TLS connection was non-properly terminated.

明显是什么gnutls_handshake() failed: The TLS connection was non-properly terminated.网络链接和鉴权等错误,和端口号一毛钱关系都没有。

三、解决方案

 

四、源码工程jack相关配置,在Android 7.0的工程中进行编译以前,运行以下命令,进行交互。 
进入源码相应目录 prebuilts/sdk/tools$ 运行下面命令: 


1)、 jack-admin start-server 
2)、jack-admin kill-server 
3)、jack-admin list-server 
4)、jack-admin uninstall-server 
5)、mm -j32 showcommands &> mm.out 
6)、jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar 
7)、jack-admin dump-report 
8)、jack-admin dump-re

五、本人亲自测试ok,成功编译。 

六、参考文章

https://blog.csdn.net/m0_37910557/article/details/116701908

https://www.136.la/jingpin/show-137547.html

https://stackoverflow.com/questions/67363030/rebuild-android-code-with-error-ssl-error-when-connecting-to-the-jack-server-t

https://www.shangmayuan.com/a/76c2ec67126a4bc881f80d92.html

  相关解决方案