android系統編譯記錄

來源:互聯網
上載者:User

標籤:

問題一:
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/emma_out/lib/classes-jarjar.jarInstall: out/host/linux-x86/framework/dx.jarInstall: out/host/linux-x86/bin/dxhost C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]<built-in>:0:0: note: this is the location of the previous definitionIn file included from frameworks/base/tools/aapt/AaptAssets.h:18:0,                 from frameworks/base/tools/aapt/AaptAssets.cpp:5:frameworks/base/tools/aapt/ZipFile.h:65:5: warning: ‘typedef’ was ignored in this declaration [enabled by default]     };     ^In file included from frameworks/base/include/utils/AssetManager.h:25:0,                 from frameworks/base/tools/aapt/AaptAssets.h:10,                 from frameworks/base/tools/aapt/AaptAssets.cpp:5:frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp<AaptSymbols>]’:frameworks/base/tools/aapt/AaptAssets.h:419:59:   required from hereframeworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]     ssize_t i = indexOfKey(key);

  解決辦法:

Fix:vi frameworks/base/libs/utils/Android.mkAdd ‘-fpermissive‘ to line 64:LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive

  

問題二:
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: declarations in dependent base ‘fst::VectorFstBaseImpl<fst::CacheState<fst::GallicArc<fst::StdArc, (fst::StringType)0u> > >’ are not found by unqualified lookupexternal/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: use ‘this->SetState’ insteadexternal/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:61: error: ‘SetState’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]           SetState(cache_first_state_id_, cache_first_state_);

  

fix-->
//方法為4.0版本源碼問題的解決方案,用在了2.3上面
cd external/srecwget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff"patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diffrm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diffcd ../..

  

問題三:
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setrlimitsFromArray’:dalvik/vm/native/dalvik_system_Zygote.c:191:19: error: storage size of ‘rlim’ isn’t known     struct rlimit rlim;

fix-->
vim dalvik/vm/native/dalvik_system_Zygote.c 增加標頭檔:#include <sys/resource.h>
問題四:
Install: out/host/linux-x86/bin/mkyaffs2imagehost Prebuilt: monkeyrunner (out/host/linux-x86/obj/EXECUTABLES/monkeyrunner_intermediates/monkeyrunner)Install: out/host/linux-x86/bin/monkeyrunnerhost C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]<built-in>:0:0: note: this is the location of the previous definitioncc1plus: all warnings being treated as errorsmake: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] 錯誤 1

  

fix-->//gcc和g++版本太高了gcc和g++版本太高了sudo apt-get install gcc-4.4sudo apt-get install g++-4.4sudo rm -rf /usr/bin/gcc /usr/bin/g++sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gccsudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
問題五:
host Prebuilt: mkuserimg.sh (out/host/linux-x86/obj/EXECUTABLES/mkuserimg.sh_intermediates/mkuserimg.sh)Install: out/host/linux-x86/bin/mkyaffs2imagehost Prebuilt: monkeyrunner (out/host/linux-x86/obj/EXECUTABLES/monkeyrunner_intermediates/monkeyrunner)host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpphost Executable: obbtool (out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/obbtool)g++: selected multilib ‘32‘ not installedmake: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/obbtool] 錯誤 1

  解決辦法:sudo apt-get install g++-4.4-multilib

問題六:

  

android系統編譯記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.