(1)在新增新用户后,进行android编译,出现如下异常:
Ensure Jack server is installed and started
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 )"
(2)对jack server重新生成,./jack-admin install-server jack-launcher.jar jack-server-4.11.ALPHA.jar
参考:https://blog.csdn.net/songtao542/article/details/53969295,但是通过测试,还是发生同样异常。
(3)查看.jack-server 目录结构,发现config.properties 没有生成。即.jack-server 生成存在异常。再对log分析发现端口存在异常,因此,需要对端口进行重新分配。
(4)解决思路:
首先,修改 .jack-settings 端口:
SERVER_PORT_SERVICE=8X76
SERVER_PORT_ADMIN=8X77
其次:config.properties 文件生成后,修改对应端口:
jack.server.service.port=8x76
jack.server.admin.port=8x77
通过,以上几个步骤解决了对应jack-server异常,谢谢!