首页 > 其他 > 详细

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

时间:2015-03-20 21:59:44      阅读:1288      评论:0      收藏:0      [点我收藏+]

编译的异常log:

system/core/include/cutils/properties.h:22:35: fatal error: sys/system_properties.h: No such file or directory
compilation terminated.
make[1]: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libinput_intermediates/<strong>xxxxx</strong>.o] 错误 1
make[1]:正在离开目录 `/home/<strong>xxxx</strong>/code/<strong>xxxxx</strong>/kk/bra_<strong>xxxx</strong>/alps'
                    ==> [FAIL]  2015/03/20 17:16:54
make: *** [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.

原文:http://blog.csdn.net/huangyabin001/article/details/44497789

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!