概述
我的系统是ubuntu14.04(32位),安卓系统源码是android4.4
1.解决:prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-aronly run on 64-bit linux
make: ***[out/host/linux-x86/obj/STATIC_LIBRARIES/libinput_intermediates/libinput.a]Error 1
原因:安装的ubuntu系统为32位,而android源代码系统的支持64位系统下编译
参考网站https://ntu-android-2014.hackpad.com/ep/pad/static/TDe6S3SaWKN
/home/hsc/usr/Android/是我存放Android4.4的源代码文件夹
根据错误提示: cd/home/hsc/usr/Android/prebuilts/tools/gcc-sdk/
然后把gcc文件下的第23到第39行注释掉,除38行外。
2.也有可能遇到系统位数不匹配
操作:更改Android源代码文件夹下的external/qemu/Makefile.target和Makefile.common文件
external/qemu/Makefile.target
252 line,
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
换成
ifneq($(BUILD_HOST_64bit),)
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
else
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m32
endif
446 line,
LOCAL_LDLIBS +=$(common_LOCAL_LDLIBS) -m64
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
换成
ifneq($(BUILD_HOST_64bit),)
LOCAL_LDLIBS +=$(common_LOCAL_LDLIBS) -m64
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
else
LOCAL_LDLIBS +=$(common_LOCAL_LDLIBS) -m32
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m32
endif
external/qemu/Makefile.common
149 line,
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
换成
ifneq($(BUILD_HOST_64bit),)
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
else
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m32
endif
301 line,
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
换成
ifneq($(BUILD_HOST_64bit),)
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
else
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m32
endif
641 line,
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -I$(intermediates) -m64
换成
ifneq($(BUILD_HOST_64bit),)
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -I$(intermediates) -m64
else
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -I$(intermediates) -m32
endif
730 line,
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
换成
ifneq($(BUILD_HOST_64bit),)
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m64
else
LOCAL_CFLAGS +=$(common_LOCAL_CFLAGS) -m32
endif
最后
以上就是安详发夹为你收集整理的ubuntu14.04(32位)下编译android4.4时遇到的问题的全部内容,希望文章能够帮你解决ubuntu14.04(32位)下编译android4.4时遇到的问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复