Skip to content Skip to sidebar Skip to footer

How To Include Static Library In Another Ndk Project?

I have created static library of one of my project say libABC.a. Now i want to use this static library in another android project at jni layer. The second project would also have i

Solution 1:

You can use PREBUILT_STATIC_LIBRARY in your Android.mk file.

They have a very detailed explanation in android-ndk/docs/PREBUILT.xml

In short you add to your Android.mk something like

include $(CLEAR_VARS)
LOCAL_MODULE := anynamehere
LOCAL_SRC_FILES := yourlib.a
include $(PREBUILT_STATIC_LIBRARY)

before your module


Post a Comment for "How To Include Static Library In Another Ndk Project?"