undefined reference to 'android::RefBase

1k Views Asked by At

I encountered below errors when I tred to call hidl APIs in native code, does any one can help to provide solution of these errors:

system/core/libutils/include/utils/StrongPointer.h:168: error: undefined reference to 'android::RefBase::decStrong(void const*) const'
system/core/libutils/include/utils/StrongPointer.h:169: error: undefined reference to 'android::sp_report_race()'
system/core/libutils/include/utils/StrongPointer.h:189: error: undefined reference to 'android::RefBase::decStrong(void const*) const'
system/core/libutils/include/utils/StrongPointer.h:190: error: undefined reference to 'android::sp_report_race()'
1

There are 1 best solutions below

0
On

"LOCAL_SHARED_LIBRARIES += libutils" should be added into Android.mk