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:
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:
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