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

2016-12-29 16:16:29 +08:00
 init
报错的具体信息如下:
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 环境中编译才行?
1791 次点击
所在节点    问与答
1 条回复
bestbug
2016-12-29 23:20:19 +08:00
是没有找到动态库,你把需要的动态库拷贝到系统的标准库路径里面去。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/331040

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX