Jack-Server(一) 编译Android7.1 Jack Sercer 常见错误
一.错误提示 Communication error with Jack server (35), try 'jack-diagnose' or see Jack server log
[ 12% 1/8] 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 )" Jack server already installed in "/home/gatsby/.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' ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1
二.jack-server 配置
Jack 是一种新型 Android 工具链,用于将 Java 源代码编译成 Android dex 字节码。
它取代了之前由 javac、ProGuard、jarjar 和 dx 等多种工具组成的 Android 工具链。
\\192.168.1.88\gatsby\.jack-settings
# Server settings SERVER_HOST=127.0.0.1 SERVER_PORT_SERVICE=8090 SERVER_PORT_ADMIN=8091 # Internal, do not touch SETTING_VERSION=4
\\192.168.1.88\gatsby\.jack-server
# #Tue Jul 23 14:10:11 CST 2019 jack.server.max-jars-size=104857600 jack.server.max-service=4 jack.server.service.port=8090 jack.server.max-service.by-mem=1\=2147483648\:2\=3221225472\:3\=4294967296 jack.server.admin.port=8091 jack.server.config.version=2 jack.server.time-out=7200
.重启一下服务
./jack-admin kill-server
./jack-admin start-server
三.权限配置
1.配置权限600
2.Linux查看程序端口占用情况 netstat -apn | grep 8080
3.Jack Service
SERVER=true 开启jack server. SERVER_PORT_SERVICE=8072 设置TCP服务器端口号用来进行汇编编译 SERVER_PORT_ADMIN=8073 设置TCP服务器端口号用来管理员的编译管理 SERVER_COUNT=1 当前未使用,一般为默认 SERVER_NB_COMPILE=4 同时编译最大线程 SERVER_TIMEOUT=60 如果server没有在60s内没有反应,那么将会关掉此服务 SERVER_LOG=${SERVER_LOG:=$SERVER_DIR/jack-$SERVER_PORT_SERVICE.log} Log输出的位置 JACK_VM_COMMAND=${JACK_VM_COMMAND:=java} 启动JVM命令