如果出现这个错误:
/usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/accRuntimeTest_intermediates/runtimeTest.o: undefined reference to dlsym@@GLIBC_2.0
/usr/bin/ld: note: 'dlsym@@GLIBC_2.0' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line
/lib/libdl.so.2: could not read symbols: Invalid operation
那: vi system/core/libacc/tests/Android.mk
LOCAL_SHARED_LIBRARIES := \
libacc
LOCAL_LDLIBS += -ldl <<===
- - - - - - - - - -
LOCAL_SHARED_LIBRARIES := \
libacc
LOCAL_LDLIBS += -ldl
LOCAL_MODULE_TAGS := tests
include $(BUILD_HOST_EXECUTABLE)