본문 바로가기

Programming/Android

안드로이드 jack 빌드 에러

http://218.155.2.70:8000/redmine/boards/9/topics/39[tip] build 시 jack 오류 해결 tip<http://218.155.2.70:8000/redmine/users/66>; 송 재옥이(가)  <http://218.155.2.70:8000/redmine/projects/android-tv-native-tvinputframework/activity?from=2016-07-01> 일분 이하 전에 추가함요약* ~/.jack 에 설정을 변경해야 한다.* multi user 환경에서는 각자 port 를 다르게 사용해야 한다.설정 변경.Jack compiler server 설정을 아래와 같이 변경SERVER_NB_COMPILE=12SERVER_TIMEOUT=10DMT-Andrid-BuildServer:brcm_android_hera$ vi ~/.jack1.    Server settingsSERVER=trueSERVER_PORT_SERVICE=8072SERVER_PORT_ADMIN=8073SERVER_COUNT=1SERVER_NB_COMPILE=12SERVER_TIMEOUT=10SERVER_LOG=${SERVER_LOG:=$SERVER_DIR/jack-$SERVER_PORT_SERVICE.log}JACK_VM_COMMAND=${JACK_VM_COMMAND:=java}2.    Internal, do not touchSETTING_VERSION=2설정 내용 $HOME/.jack fileThe $HOME/.jack file contains settings for Jack server variables, in a fullbash syntax.Here are the available settings, with their definitions and default values:SERVER=true Enable the server feature of Jack.SERVER_PORT_SERVICE=8072 Set the TCP port number of the server forcompilation purposes.SERVER_PORT_ADMIN=8073 Set the TCP port number of the server for adminpurposes.SERVER_COUNT=1 Unused at present.SERVER_NB_COMPILE=4 Maximum number of parallel compilations allowed.SERVER_TIMEOUT=60 Number of idle seconds the server has to wait without anycompilation before shutting itself down.SERVER_LOG=${SERVER_LOG:=$SERVER_DIR/jack-$SERVER_PORT_SERVICE.log} Filewhere server logs are written. By default, this variable can be overloadedby an environment variable.JACK_VM_COMMAND=${JACK_VM_COMMAND:=java} The default command used to launcha JVM on the host. By default, this variable can be overloaded byenvironment variable.Jack limitationsThe Jack server is mono-user by default, so can be only used by one user ona computer. If it is not the case, please, choose different port numbersfor each user and adjust SERVER_NB_COMPILE accordingly. You can alsodisable the Jack server by setting SERVER=false in your $HOME/.jack.check logIf you have any other issuesTo report bugs or request features, please use our public issue tracker,available at http://b.android.com, with the Jack tool bug report or Jacktool feature request templates. Please attach the Jack log to the bugreport.Finding the Jack logIf you ran a make command with a dist target, the Jack log is located at$ANDROID_BUILD_TOP/out/dist/logs/jack-server.logOtherwise you can find it in by running jack-admin server-logIn case of reproducible Jack failures, you can get a more detailed log bysetting one variable, as follows:$ export ANDROID_JACK_EXTRA_ARGS="--verbose debug --sanity-checks on -Dsched.runner=single-threaded" Then use your standard makefile commands to compile the tree or yourproject and attach its standard output and error.To remove detailed build logs use:$ unset ANDROID_JACK_EXTRA_ARGSJack 설명Jack is a new Android toolchain that compiles Java source into Android dexbytecode. It replaces the previous Android toolchain, which consists ofmultiple tools, such as javac, ProGuard, jarjar, and dx.The Jack toolchain provides the following advantages:Completely open sourceAvailable in AOSP; partners are welcome to contribute.Speeds compilation timeJack has specific supports to reduce compilation time: pre-dexing,incremental compilation and a Jack compilation server.Handles shrinking, obfuscation, repackaging and multidexUsing a separate package such as ProGuard is no longer necessary