init
V2EX  ›  问与答

安卓 6.0 环境下编译出来的 bin 文件在执行的过程中报错

  •  
  •   init · Dec 29, 2016 · 2234 views
    This topic created in 3495 days ago, the information mentioned may be changed or developed.
    报错的具体信息如下:
    root@phone:/system/bin # ./testServer
    ./testServer
    CANNOT LINK EXECUTABLE: cannot locate symbol "__aeabi_memcpy" referenced by "./testServer"...
    page record for 0xf73b201c was not found (block_size=16)

    Android.mk 如下:

    LOCAL_PATH := $(call my-dir)

    #生成 binder service 的本地服务端
    include $(CLEAR_VARS)
    LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libutils \
    libbinder
    LOCAL_MODULE := Server
    LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
    LOCAL_SRC_FILES := \
    IService.cpp \
    Service.cpp
    LOCAL_32_BIT_ONLY := true
    LOCAL_MODULE_TAGS := optional
    include $(BUILD_EXECUTABLE)

    #生成 binder service 的本地客户端
    include $(CLEAR_VARS)
    LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libutils \
    libbinder
    LOCAL_32_BIT_ONLY := true
    LOCAL_MODULE := testServer
    LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
    LOCAL_SRC_FILES := \
    IService.cpp \
    testService.cpp

    LOCAL_MODULE_TAGS := optional
    include $(BUILD_EXECUTABLE)

    很奇怪的是 编译出来的这个 bin 在 1 加上能执行, 乐视,酷派就不行?网上翻了很多但是并没有什么解决方法,还请各位赐教。
    我的一个想法是 是不是得从厂商的 android 环境中编译才行?
    1 replies    2016-12-29 23:20:19 +08:00
    bestbug
        1
    bestbug  
       Dec 29, 2016 via Android
    是没有找到动态库,你把需要的动态库拷贝到系统的标准库路径里面去。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2731 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 04:43 · PVG 12:43 · LAX 21:43 · JFK 00:43
    ♥ Do have faith in what you're doing.