最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Android 4编译错误汇总

IT圈 admin 28浏览 0评论

2024年4月27日发(作者:枚雪枫)

2.Q:

frameworks/base/libs/utils/:483:67: error: passing ‘const

android::RefBase::weakref_impl’ as ‘this’ argument of ‘void

android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers

[-fpermissive]

make: ***

[out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error

1

解决方法:

$ gedit frameworks/base/libs/utils/

修改以下语句

LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

3.Q:

arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

make: *** [out/target/product/generic/obj/lib/crtbegin_dynamic.o] Error 1

如果之前的依赖包都已经安装成功的话,此处应该是交叉编译工具权限的问题。这个

问题只要在文章开头lunch时执行了赋予权限命令,就应该不会遇到了。

4.Q:

:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]

:0:0: note: this is the location of the previous definition

cc1plus: all warnings being treated as errors

make: ***

[out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1

此处编译错误是由于ubuntu 11.10采用了GCC4.6.1导致的。

解决方法:

修改源码目录下/build/core/combo/HOST_文件:

将以下语句

HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0

2024年4月27日发(作者:枚雪枫)

2.Q:

frameworks/base/libs/utils/:483:67: error: passing ‘const

android::RefBase::weakref_impl’ as ‘this’ argument of ‘void

android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers

[-fpermissive]

make: ***

[out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error

1

解决方法:

$ gedit frameworks/base/libs/utils/

修改以下语句

LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

3.Q:

arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

make: *** [out/target/product/generic/obj/lib/crtbegin_dynamic.o] Error 1

如果之前的依赖包都已经安装成功的话,此处应该是交叉编译工具权限的问题。这个

问题只要在文章开头lunch时执行了赋予权限命令,就应该不会遇到了。

4.Q:

:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]

:0:0: note: this is the location of the previous definition

cc1plus: all warnings being treated as errors

make: ***

[out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1

此处编译错误是由于ubuntu 11.10采用了GCC4.6.1导致的。

解决方法:

修改源码目录下/build/core/combo/HOST_文件:

将以下语句

HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0

发布评论

评论列表 (0)

  1. 暂无评论