zoukankan      html  css  js  c++  java
  • android源码编译常见错误

    错误1:You are attempting to build on a 32-bit system.

    Only 64-bit build environments are supported beyond froyo/2.2.

    解决:

    ./external/clearsilver/cgi/Android.mk

    ./external/clearsilver/java-jni/Android.mk

    ./external/clearsilver/util/Android.mk

    ./external/clearsilver/cs/Android.mk

    四个文件中的

    LOCAL_CFLAGS += -m64

    LOCAL_LDFLAGS += -m64

    将“64”换成“32”

    LOCAL_CFLAGS += -m32

    LOCAL_LDFLAGS += -m32

    然后,将./build/core/main.mk 中的

    ifneq (64,$(findstring 64,$(build_arch)))

    改为:

    ifneq (i686,$(findstring i686,$(build_arch)))

     

    错误2:make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o]

    解决:

    gedit frameworks/base/libs/utils/Android.mk

    找到

    LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

    改成

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

    错误3: make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt]

    解决:                                   

     frameworks/base/tools/aapt/Android.mk

    打开文件Android.mk,

    ifeq ($(HOST_OS),linux)

    LOCAL_LDLIBS += -lrt   

    改成    

    LOCAL_LDLIBS += -lrt -lpthread

    错误4:make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.dex]

    解决:

    虚拟机内存512太小,给个1G

    错误 5:make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize]

    解决:

    修改./framework/base/tools/localize/Android.mk文件

    ifeq ($(HOST_OS),linux)

    LOCAL_LDLIBS += -lrt  

    改成   

    LOCAL_LDLIBS += -lrt -lpthread

    Endif

    错误6

    make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o]

    解决

    /build/core/combo/HOST_linux-x86.mk文件:

    将以下语句

    HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0

    改成

     HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0  

  • 相关阅读:
    python+webdriver(二)
    python+webdriver(一)
    重逢
    在C,C++,java和python运行时解释器和编译器的区别
    hive调优
    github 操作指南
    jupyter 启动时的问题
    海量数据模型实施方法论
    python之Tkinker学习
    使用cmd命令行进行本地证书读取
  • 原文地址:https://www.cnblogs.com/wuweidu/p/3334638.html
Copyright © 2011-2022 走看看