jack server交互命令:
jack-admin start-server
jack-admin kill-server
jack-admin list-server
jack-admin uninstall-server
mm -j32 showcommands &> mm.out
jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar
jack-admin dump-report
jack-admin dump-re
jack-admin server-log 查找log所在目录
问题一:多用户同时编译时报错
错误信息:
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.31.CANDIDATE.jar 4.31.CANDIDATE || exit 47 )"
Jack server already installed in "/home/disk/lixialong/.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‘
解决方案:同时修改$HOME/.jack-settings和$HOME/.jack-server/config.properties中的端口号(比如都改为8386/8387,端口号值为0~65535,1024下的值不要用),方可支持多用户同时编译。
(1)$HOME/.jack-settings
SERVER_PORT_SERVICE=8386 SERVER_PORT_ADMIN=8387
(2)$HOME/.jack-server/config.properties
jack.server.service.port=8386 jack.server.admin.port=8387
问题二: No Jack server running. Try ‘jack-admin start-server‘
com.android.jack.server.api.v01.ServerException: ‘./config.properties‘ musthave permission rw------- but have rwx------ Caused by: java.io.IOException: ‘./config.properties‘ must have permissionrw------- but have rwx------ ... 2 more
解决方案:通过查看文件 $HOME/.jack-server/logs/jack-server-0-0.log:
发现是配置文件的权限不对造成的,把文件$HOME/.jack-server/config.properties的权限由rwx改为rw即可解决问题。
问题三:
ERROR: Communication error with Jack server (52) make: *** [out/target/common/obj/JAVA_LIBRARIES/libutil_intermediates/classes.jack] Error
这种情况多半属于jack-admin缺少变量JACK_JAR而导致的。
解决方案:工程根目录内执行以下三句,再进行编译。
export JACK_JAR=./out/host/linux-x86/framework/jack.jar ./out/host/linux-x86/bin/jack-admin stop-server ./out/host/linux-x86/bin/jack-admin start-server