Skip to content

android java 点点滴滴

David edited this page Jan 5, 2015 · 10 revisions

java android

  • Setting up a Device for Development
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 

In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules

#export ANDROID_HOME=/home/housy/adt-bundle-linux-x86-20130219/sdk/ export ANDROID_HOME=/home/housy/adt-bundle-linux-x86_64-20140702/sdk export ANDROID_SDK_ROOT=$ANDROID_HOME export NDK_ROOT=/home/housy/android-ndk-r10c export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/build-tools/android-4.4W:$PATH

#export JAVA_HOME=/home/housy/adt-bundle-linux-x86-20130219/jdk1.6.0_26 export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_51
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH



* INSTALL_FAILED_CONTAINER_ERROR
* 当工程使用android:installLocation="preferExternal" 时,某些时候会出现。 解决办法:修改为android:installLocation="auto" 即可

* framework/base/preloaded-classes 该文件包含若干预加载的class。 曾经改过一个bug, ANR相关的, 一个控件类初始化时有大量浮点运算, 导致偶尔发生ANR, 研究后将该类放到预加载类中, 问题得以解决。

* ~/android-4.3.1-r2/build$ source envsetup.sh 加载envsetup后, 有几个小工具值得用用: croot, 在android任意source目录直接退到android代码根目录; cgrep, grep for c c++ 和头文件; jgrep, 搜*.java; resgrep, 搜资源。 还有其他相关的,具体可查看envsetup.sh源码。

* [[android-做一个懒惰高效的Android程序员-系列]]

* [[android-分辨率屏幕大小密度]]

* [[android-调试工具集]]

* [[android-消息推送]]
* [[百度云推送]]
* [[极光推送]]
* 个推

* [[android 电子书]]

* [[android-PowerManagerService]]

* [[android tcpdump & Wireshark]]

* [[android-TV版-视频播放客户端]]

* [[android-debugd]]

* [[android-播放器]]

* [[java JNLP]]

* [[android-log源码分析]]

* [[android-mediaplayer源码分析]]

* Java Excel API - A Java API to read, write and modify Excel spreadsheets http://www.andykhan.com/jexcelapi/
Clone this wiki locally