chmod a+ jdk-1_5_0_18-linux-i586.bin sudo sh ./jdk-1_5_0_18-linux-i586.bin sudo mv jdk1.5.0_18/ /opt/ touch /etc/profile.d/java.sh
填写 /etc/profile.d/java.sh 的内容为:
export JDK_DIR=/opt/jdk1.5.0_18 export JDK_HOME=$JDK_DIR export PATH=$JDK_DIR/bin:$PATH
eclipse->help->add site
http://dl-ssl.google.com/android/eclipse/site.xml
到官方下载,我一般解压到用户根目录下 ~/android-sdk-linux_86 ,设置环境变量:
# For Android export PATH=${PATH}:~/android-sdk-linux_86/tools:~/android-sdk-linux_86/platform-tools
Android Code Style Guidelines for Contributors : http://source.android.com/source/code-style.html
编辑 ~/.vimrc,添加以下内容:
" For Android code style set shiftwidth=4 set tabstop=4 autocmd FileType java set expandtab
你可以导入development/ide/eclipse下的文件,使得Eclipse按照Android代码风格规则。选择 “Window › Preferences › Java › Code Style,使用 “Formatter › Import” ,导入android-formatting.xml,”Organize Imports › Import” 导入 android.importorder.
eclipse tab 设置为4个空格: Preferences -> General -> Editors -> Text Editors: Insert spaces for tabs
修改 eclipse.ini 配置文件,根据机器配置(2G内存,双核),如下:
-XX:MaxPermSize=256m -Xms512m -Xmx512m -XX:+UseParallelGC
coloredlogcat.py http://jsharkey.org/blog/2009/04/22/modifying-the-android-logcat-stream-for-full-color-debugging/
常用的工具,我一般放在 ~/tools-common 目录下,
然后写个脚本 log.sh:
#!/bin/bash adb logcat | ~/tools-common/coloredlogcat.py