解決fatal error: sys/system_properties.h: No such file or directory compilation terminated.

來源:互聯網
上載者:User

標籤:

編譯的異常log:

system/core/include/cutils/properties.h:22:35: fatal error: sys/system_properties.h: No such file or directorycompilation terminated.make[1]: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libinput_intermediates/<strong>xxxxx</strong>.o] 錯誤 1make[1]:正在離開目錄 `/home/<strong>xxxx</strong>/code/<strong>xxxxx</strong>/kk/bra_<strong>xxxx</strong>/alps'                    ==> [FAIL]  2015/03/20 17:16:54make: *** [mm] 錯誤 2

分析:

編譯不過是由於BUILD_HOST_STATIC_LIBRARY沒有引用相應的靜態庫,在mk檔案引用相應靜態庫,編譯通過。

修改Android.mk檔案:

LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_LIBRARIES := \
    libcutils \

include $(BUILD_HOST_STATIC_LIBRARY)

如果找不到對應模組的mk檔案可用下面這條命令嘗試搜尋:

//下面的xxxx.cpp可以使編譯模組中的檔案,最好是你修改之後的檔案

find -name *.mk | xargs grep "xxxx.cpp" -nsr --color=auto

注!上面xxxx為了避免敏感資訊而用xxxx來代替。本人對於編譯指令碼和底層並不是很熟悉,因此對這個解決過程比較痛苦,所以留下這篇部落格與遇到此類問題的朋友共勉,也希望大家能夠理解這種分享的精神。

解決fatal error: sys/system_properties.h: No such file or directory compilation terminated.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.