您的位置:首页 > 移动开发 > Android开发

Android ENV Setup Errors

2016-07-01 23:22 441 查看

Android source code compile error: “Try increasing heap size with java option ‘-Xmx’”

Same problem here. I tried setting JACK_SERVER_VM_ARGUMENTS to include -Xmx=4g, but when building again the log output showed that this was not included in the startup. Dunno why, seems like the env vars do not get passed to the build script correctly.

Solution: before starting a clean android build set the JACK_SERVER_VM_ARGUMENTS to include -Xmx=4g, then stop and stat the jack server manually. Given you're in the main source tree of AOSP run the following:


export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server


通过跟踪顶层makefile,找到有关jack的目录:prebuilts/sdk/tools,其中看到有个jack-admin,正是启动jack所在的shell。里面有个设置:

#
# Settings
#
JACK_HOME="${JACK_HOME:=$HOME/.jack-server}"
CLIENT_SETTING="${CLIENT_SETTING:=$HOME/.jack-settings}"
TMPDIR=${TMPDIR:=/tmp}
JACK_SERVER_VM_ARGUMENTS="${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 -XX:+TieredCompilation}"


修改一下,增加-Xmx2048M:

#
# Settings
#
JACK_SERVER_VM_ARGUMENTS="${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx:2048M}"


Increasing Java Heap Size — Out of memory error — java -Xmx3000M -Xms1500M -XshowSettings:all

java -Xmx3000M -Xms1500M -XshowSettings:all


ubuntu运行android studio出错unable to run mksdcard sdk tool

系统是ubantu 15.04 64位
原因:缺少lib

解决方法:
sudo apt-get install lib32z1 lib32ncurses5  lib32stdc++6
完美解决。


Git error: Unable to negotiate with XX.XX.XXX.XXX : no matching host key type found . their offer: ssh-dss

I have found the problem , The new OpenSSH versions disable the ssh-dss (DSA) public key algorithm. DSA was deemed too weak and OpenSSH community recommends against its use.

If you see an error similar to this:

Unable to negotiate with 10.96.8.72: no matching host key type found. Their offer: ssh-dss
...then you must re-enable the DSA keys by editing your ~/.ssh/config file to add the following line:

HostkeyAlgorithms +ssh-dss
You may need to create the ~/.ssh/config file if it does not a
4000
lready exist.

After creating the file, you must restrict access permissions:

chmod 600 ~/.ssh/config
and then do the clone. That should work perfectly fine!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: