久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
    分享

    沒有硬件,我們就玩模擬的——android4.0編譯過程

     開花結(jié)果 2012-03-14

    玩不起真手機(jī),就玩玩模擬器吧

    #######################################################

    獲得android4.0源碼

    $ mkdir ~/bin

    $ PATH=~/bin:$PATH

    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

    $ chmod a+x ~/bin/repo

    $ mkdir WORKING_DIRECTORY

    $ cd WORKING_DIRECTORY

    $ repo init -u https://android./platform/manifest

    $ repo init -u https://android./platform/manifest -b android-4.0.1_r1

    $ repo sync

    #######################################################

    安裝必要包

    sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev g++

    我用的系統(tǒng)是ubuntu10.04的虛擬機(jī),筆記本內(nèi)存2G, 虛擬機(jī)內(nèi)存設(shè)的是1G,在虛擬機(jī)編譯速度慢的可想而知,編譯花了好幾天的.

    ######################################################

    ############解決源代碼文件夾太大的問題################

    源代碼獲取后

    rm -rf .repo

    rm -rf `find . -name .git`

    ######################################################

    ############解決java版本報(bào)錯(cuò)的問題####################

    安裝java 1.6

    sudo add-apt-repository "deb http://archive./ lucid partner"

    sudo apt-get update

    sudo apt-get install sun-java6-jdk

    設(shè)置環(huán)境變量

    修改~/.bashrc增加下面的內(nèi)容:

    export JAVA_HOME=/usr/lib/jvm/java-6-sun

    export PATH=/usr/lib/jvm/java-6-sun/bin:$PATH

    export CLASSPATH=/usr/lib/jvm/java-6-sun/lib/tools.jar:/usr/lib/jvm/java-6-sun/lib/dt.jar:/usr/lib/jvm/java-6-sun/lib/rt.jar:/usr/lib/jvm/java-6-sun/lib/

    執(zhí)行命令

    source ~/.bashrc

    ######################################################

    編譯開始

    work@ubuntu:/media/zhaodezhong/study/ics_source$ . build/envsetup.sh 

    including device/samsung/maguro/vendorsetup.sh

    including device/samsung/tuna/vendorsetup.sh

    including device/ti/panda/vendorsetup.sh

    including sdk/bash_completion/adb.bash

    work@ubuntu:/media/zhaodezhong/study/ics_source$ lunch 

    You're building on Linux

    Lunch menu... pick a combo:

         1. full-eng

         2. full_x86-eng

         3. vbox_x86-eng

         4. full_maguro-userdebug

         5. full_tuna-userdebug

         6. full_panda-eng

    Which would you like? [full-eng] 1

    ============================================

    PLATFORM_VERSION_CODENAME=REL

    PLATFORM_VERSION=4.0.1

    TARGET_PRODUCT=full

    TARGET_BUILD_VARIANT=eng

    TARGET_BUILD_TYPE=release

    TARGET_BUILD_APPS=

    TARGET_ARCH=arm

    TARGET_ARCH_VARIANT=armv7-a

    HOST_ARCH=x86

    HOST_OS=linux

    HOST_BUILD_TYPE=release

    BUILD_ID=ITL41D

    ============================================

    work@ubuntu:/media/zhaodezhong/study/ics_source$ make

    ###############

    錯(cuò)誤一:頭文件找不到

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_CONNSECMARK.c

    target thumb C: libext <= out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_conntrack.c

    target thumb C: libext <= out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_cpu.c

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:26:41: error: linux/netfilter/xt_connmark.h: No such file or directory

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c: In function 'connmark_mt_parse':

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:56: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:57: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:58: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c: In function 'connmark_mt_print':

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:97: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:99: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:99: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c: In function 'connmark_mt_save':

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:118: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:122: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:122: error: dereferencing pointer to incomplete type

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c: At top level:

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:144: error: invalid 

    application of 'sizeof' to incomplete type 'struct xt_connmark_mtinfo1' 

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:144: error: invalid 

    application of 'sizeof' to incomplete type 'struct xt_connmark_mtinfo1' 

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:144: error: invalid 

    application of 'sizeof' to incomplete type 'struct xt_connmark_mtinfo1' 

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:145: error: invalid 

    application of 'sizeof' to incomplete type 'struct xt_connmark_mtinfo1' 

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:145: error: invalid 

    application of 'sizeof' to incomplete type 'struct xt_connmark_mtinfo1' 

    out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.c:145: error: invalid 

    application of 'sizeof' to incomplete type 'struct xt_connmark_mtinfo1' 

    make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libext_intermediates/libxt_connmark.o] Error 1

    make: *** Waiting for unfinished jobs....

    分析原因:我是在windows下用rar解壓tar包的,在解壓過程中有文件丟失。偷懶的壞處!

    解決辦法:到linux/netfilter/下發(fā)現(xiàn)確實(shí)沒有xt_connmark.h文件,重新在linux下解壓源碼的tar包。

    ########################

    問題二:信號(hào)9中斷了編譯過程

    (out/target/product/generic/obj/lib/libstagefright_soft_vorbisdec.so)

    target Strip: libstagefright_soft_vpxdec (out/target/product/generic/obj/lib/libstagefright_soft_vpxdec.so)

    target Strip: libvideoeditorplayer (out/target/product/generic/obj/lib/libvideoeditorplayer.so)

    target SharedLib: libwebcore 

    (out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so)

    compiling all .cfh files into .class files

    elapsed seconds: 3930

    wrote generated Main_*.java files to out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files

    target Executable: SurfaceMediaSource_test 

    (out/target/product/generic/obj/EXECUTABLES/SurfaceMediaSource_test_intermediates/LINKED/SurfaceMediaSource_test)

    target Executable: SurfaceTexture_test 

    (out/target/product/generic/obj/EXECUTABLES/SurfaceTexture_test_intermediates/LINKED/SurfaceTexture_test)

    target Strip: jpeg_bench (out/target/product/generic/obj/EXECUTABLES/jpeg_bench_intermediates/jpeg_bench)

    target SharedLib: libcameraanalyzer 

    (out/target/product/generic/obj/SHARED_LIBRARIES/libcameraanalyzer_intermediates/LINKED/libcameraanalyzer.so)

    target Strip: libplatform_library_jni (out/target/product/generic/obj/lib/libplatform_library_jni.so)

    target SharedLib: libsampleplugin 

    (out/target/product/generic/obj/SHARED_LIBRARIES/libsampleplugin_intermediates/LINKED/libsampleplugin.so)

    Install: out/host/linux-x86/lib/libSR_Session.so

    Install: out/host/linux-x86/lib/libSR_Recognizer.so

    Install: out/host/linux-x86/bin/parseStringTest

    Install: out/host/linux-x86/bin/test_g2g

    Install: out/host/linux-x86/bin/test_swiarb

    collect2: ld terminated with signal 9 [Killed]

    make: *** [out/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/dx-tests] Killed

    make: *** Deleting file `out/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/dx-tests'

    make: *** Waiting for unfinished jobs....

    make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] 

    Killed

    make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so] Error 

    1

    原因分析:主要是Linux 系統(tǒng)沒加swap分區(qū)的原因,或是swap分區(qū)太小。

    解決辦法:解決的方法很簡單,建個(gè)swap文件。

    #sudo  dd if=/dev/zero of=/opt/other/swapfile bs=1024 count=512K

    # sudo mkswap /opt/other/swapfile

    # sudo swapon /opt/other/swapfile

    # swapon -s

    Filename Type Size Used Priority

    /dev/sda5                               partition 1128440 39588 -1

    /opt/other/swapfile                     file 524280 0 -2

    需要注意:在出現(xiàn)這樣的情況下,編譯命令最好使用單線程的,即make,而不要使用make -j4(可能會(huì)出現(xiàn)上面的問題)。

    ########################

    錯(cuò)誤三:CTS編譯出錯(cuò)

    make: Entering directory `/media/zhaodezhong/study/ics_source'

    target Symbolic: libcameraanalyzer (out/target/product/generic/symbols/system/lib/libcameraanalyzer.so)

    target Strip: libcameraanalyzer (out/target/product/generic/obj/lib/libcameraanalyzer.so)

    target Java: CtsVerifier (out/target/common/obj/APPS/CtsVerifier_intermediates/classes)

    cts/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java:191: onCreateDialog

    (int,android.os.Bundle) in android.app.Activity cannot implement onCreateDialog(int,android.os.Bundle) in 

    com.android.cts.verifier.PassFailButtons.PassFailActivity; attempting to assign weaker access privileges; was 

    public

        private static <T extends android.app.Activity & PassFailActivity>

                        ^

    1 error

    make: *** [out/target/common/obj/APPS/CtsVerifier_intermediates/classes-full-debug.jar] Error 41

    make: Leaving directory `/media/zhaodezhong/study/ics_source'

    原因分析:原因不詳,忘高人指教。。。

    解決辦法:在網(wǎng)上查了些資料,知道CTS 全稱Compatibility Test Suite兼容性測試工具。當(dāng)電子產(chǎn)品開發(fā)出來,并定制了自己Android系統(tǒng)后,必須要通過最新的CTS檢測,以保證標(biāo)準(zhǔn)的android application能運(yùn)行在該平臺(tái)下。通過了CTS驗(yàn)證,需要將測試報(bào)告提交給Google,已取得android market的認(rèn)證。感覺對(duì)android自身運(yùn)行關(guān)系不大,所以干脆不編譯這塊內(nèi)容了。

    找到cts/下的Android.mk文件,注釋掉里面兩行代碼

    #include cts/CtsTestCoverage.mk

    #include $(call all-subdir-makefiles)

    整個(gè)cts/下的代碼都不編譯了,OK,這個(gè)問題解決就編譯通過了。

    ############################

    啟動(dòng)模擬器

    work@ubuntu:/media/zhaodezhong/study/ics_source$ emulator

      本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
      轉(zhuǎn)藏 分享 獻(xiàn)花(0

      0條評(píng)論

      發(fā)表

      請(qǐng)遵守用戶 評(píng)論公約

      類似文章 更多

      主站蜘蛛池模板: 日韩AV无码免费播放| 高清不卡一区二区三区| 久久国产福利播放| 东京热人妻无码一区二区av| 中文字幕亚洲制服在线看| 强奷漂亮少妇高潮伦理| 亚洲欧美牲交| 欧美国产综合欧美视频| 少妇高潮喷水正在播放| 高大丰满熟妇丰满的大白屁股| 熟妇人妻中文字幕| 国产对白老熟女正在播放| 亚洲欧洲中文日韩久久AV乱码| 婷婷丁香五月六月综合激情啪| 人妻丰满AV无码中文字幕| 中国女人熟毛茸茸A毛片| 亚洲国产AV无码一区二区三区| 91精品国产午夜福利| 国产成人无码A区在线观看视频| 国产成人亚洲欧美二区综合| 国产精品无码久久综合网| 高清自拍亚洲精品二区| 国产丰满美女A级毛片| 国产成人午夜精品影院| 日本中文字幕有码在线视频| 午夜性色一区二区三区不卡视频| 草草浮力影院| 国精品无码一区二区三区在线蜜臀| 最新亚洲人成网站在线影院| 欧美国产日韩A在线观看| 成人无码午夜在线观看| 国产首页一区二区不卡| 亚洲国产成人久久久网站| 精品无码久久久久成人漫画| 亚洲香蕉网久久综合影视| 亚洲另类激情专区小说图片| 狠狠色噜噜狠狠狠狠7777米奇| 国产女人喷潮视频免费| 久久精品免视看国产成人| 精品久久久久久无码人妻热| 国产JJZZJJZZ视频全部免费|