android8.0编译出现FAILED: setup-jack-server错误解决方法

阳航
2023-12-01
[  0% 526/102096] 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/project/.jack-server"
Communication error with Jack server (58), try 'jack-diagnose' or see Jack server log

Failed to contact Jack server: Problem reading /home/project/.jack-server/client.pem. Try 'jack-diagnose'

Failed to contact Jack server: Problem reading /home/project/.jack-server/client.pem. Try 'jack-diagnose'

解决办法:

此问题的一个特点是/home/project/.jack-server/client.pem这个文件找不到。对比可以正常编译的机器,可以发现正常应该有这个问题的。建议重启机器试试。

修改jack server端口。注意有两个地方需要修改

1. ~/.jack-settings

SERVER_PORT_SERVICE=8076

SERVER_PORT_ADMIN=8077

2. ~/.jack-server/config.properties 

jack.server.service.port=8076

jack.server.admin.port=8077

两个地方需要保持一致

MTK6762的O版本,在源码alps/prebuilts/sdk/tools/jack-admin中修改即可。

 类似资料: