zoukankan      html  css  js  c++  java
  • Android sdk and souce code download & compile

     Eclipse导入源码:cp development/ide/eclipse/.classpath ./

    一.sdk的配置

    sdk for linux

    1.# tar xzf android-sdk_r04-linux_86.tgz

    2.进tools目录执行./android

    3.force选中

    sdk for windows

    folder failed to be renamed or moved on SDK instal的处理方法:
    1, 复制 tools目录 为一个新的目录 tools-copy ,此时在android-sdk-windows 目录下有两个目录 tools 和 tools-copy
    2, 在tools-copy目录运行 android.bat ,这样就可以正常 update all 了
    3,之后,关闭 sdk,
    4, 在 android-sdk-windows 目录运行 SDK Setup.exe
     

     二.source code 编译for linux

    http://mmmyddd.freeshell.net/wiki/android/build.html

    补充下:
    REPO_URL='http://android.git.kernel.org/tools/repo.git'
    改为:

    REPO_URL='git://codeaurora.org/tools/repo.git' 

    编译需要的软件:

    sudo apt-get install bison libc6-dev-amd64 g++-multilib zlib1g-dev lib64z1-dev flex libncurses5-dev libx11-dev gperf

    ubuntu要改的:

    update-alternatives --install /usr/bin/java java /usr/lib/jvm/java/jdk1.6.0_12/bin/java 300

    update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java/jdk1.6.0_12/bin/javac 300

    update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/java/jdk1.6.0_12/bin/jarc 300
    update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java/jdk1.6.0_12/bin/javah 300
    update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java/jdk1.6.0_12/bin/javadoc 300
    jdk1.6编译:
    修改<src/build/core/make.mk> 
    java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1.5[. "$$]')
    javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1.5[. "$$]')

    出现错误

    build/core/main.mk:73: You are attempting to build on a 32-bit system.
    build/core/main.mk:74: Only 64-bit build environments are supported beyond froyo/2.2.
    修改:

    ./external/clearsilver/cgi/Android.mk 
    ./external/clearsilver/java-jni/Android.mk 
    ./external/clearsilver/util/Android.mk 
    ./external/clearsilver/cs/Android.mk
    四个文件中的
    LOCAL_CFLAGS += -m64 
    LOCAL_LDFLAGS += -m64 
    注释掉,或者将“64”换成“32”
    LOCAL_CFLAGS += -m32 
    LOCAL_LDFLAGS += -m32
    然后,将
    ./build/core/main.mk 中的
    ifneq (64,$(findstring 64,$(build_arch))) 
    改为:
    ifneq (i686,$(findstring i686,$(build_arch))) 
     
    frameworks/base/media/libstagefright/OMXCodec.cpp:859: error: 'struct QOMX_VIDEO_PARAM_DIVXTYPE' has no member named 'pDrmHandle'
    frameworks/base/media/libstagefright/OMXCodec.cpp:860: error: 'struct QOMX_VIDEO_PARAM_DIVXTYPE' has no member named 'pDrmHandle'
    frameworks/base/media/libstagefright/OMXCodec.cpp:861: error: 'struct QOMX_VIDEO_PARAM_DIVXTYPE' has no member named 'pDrmHandle'
    frameworks/base/media/libstagefright/OMXCodec.cpp:890: error: 'struct QOMX_VIDEO_PARAM_DIVXTYPE' has no member named 'pDrmHandle'
    frameworks/base/media/libstagefright/OMXCodec.cpp:891: error: 'struct QOMX_VIDEO_PARAM_DIVXTYPE' has no member named 'pDrmHandle'
    frameworks/base/media/libstagefright/OMXCodec.cpp:892: error: 'struct QOMX_VIDEO_PARAM_DIVXTYPE' has no member named 'pDrmHandle'
    repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread_house -m M7630AABBQMLZA414001.xml --repo-url=git://codeaurora.git/tools/repo.git  
    repo sync

     Android SDK下载和更新失败的解决方法http://blog.csdn.net/android_tutor/article/details/7425021

     
  • 相关阅读:
    51nod 1051【基础】
    HDU5971【瞎搞】
    Lightoj1018 【状压DP】
    HDU2604【矩阵快速幂】
    HDU1501【简单DP】
    HDU3555【数位DP】
    Lightoj1037【状压DP】
    51nod 1099【贪心】
    HDU5950【矩阵快速幂】
    51nod 1049【经典】
  • 原文地址:https://www.cnblogs.com/fangxiang/p/1903370.html
Copyright © 2011-2022 走看看