1.问题 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/jasonfan/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx8192m -cp /home/jasonfan/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
No Jack server running. Try 'jack-admin start-server'
No Jack server running. Try 'jack-admin start-server'
2.尝试方法(都没有解决) 2.1重新安装jack-server (1) ./prebuilts/sdk/tools/jack-admin kill-server (2)?./prebuilts/sdk/tools/jack-admin uninstall-server (3)rm ~/.jack-setting 删除后,在编译代码时会自动安装.(makefile 调用/prebuilts/sdk/tools/jack-server-setup.mk)
2.2修改port (1)vi ~/.jack-setting SERVER_PORT_SERVICE=8066 SERVER_PORT_ADMIN=8067 (2)vi ~/.jack-server/config.properties jack.server.service.port=8066 jack.server.admin.port=8067 据说多人用电脑会导致端口被占用
2.3修改java.security文件 sudo vim /etc/java-8-openjdk/security/java.security sdk.tls.disabledAlgorithms=???????//去掉TLS1和TLS1.1参数 或 sdk.certpath.disableAlgorithms=? ??//去掉TLS1和TLS1.1参数 或 同时去掉
2.4 修改文件权限 ~/.jack-server/config.properties和.jack-settings的权限由rwx改为rw即可解决问题 sudo chmod -R 0600?.jack-settings sudo chmod -R 0600?.jack-server/config.properties
2.5添加-Xmx4096M JACK_SERVER_VM_ARGUMENTS=”${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096M}” JACK_SERVER_COMMAND=“…… -Xmx4096m -cp ……”?
3.问题解决 3.1问题原因: 之前下载android代码前,更新了openjdk-8-jdk版本 3.2解决方法: 3.2.1查看openjdk版本 $java -version 3.2.2查看所有jdk安装包 dpkg --list | grep -i jdk 3.2.3删除openjdk $sudo apt-get purge openjdk* 3.2.4卸载 OpenJDK 相关包 $sudo apt-get purge icedtea-* openjdk-* 3.2.5再次检查是否卸载成功 $sudo dpkg --list | grep -i jdk 3.2.6搜索可安装版本 $sudo apt-cache madison openjdk-8-jdk
3.2.7选择旧版本安装 ?(1)$sudo apt-get install openjdk-8-jdk-headless=8u252-b09-1ubuntu1 ?(2)$sudo apt-get install openjdk-8-jre=8u252-b09-1ubuntu1 ?(3)$sudo apt-get install openjdk-8-jdk=8u252-b09-1ubuntu1 3.2.8删除jack-server (1) ./prebuilts/sdk/tools/jack-admin kill-server (2)?./prebuilts/sdk/tools/jack-admin uninstall-server (3)rm ~/.jack-setting 3.2.9重启电脑 $sudo?reboot 3.2.10删除out目录重新编译 ?
?
|