In my case, I was adding a shared library that needed gnustl_shared, so I added it to my Android.mk file:
include $(CLEAR_VARS) LOCAL_MODULE := libgnustl_shared LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_STATIC_LIBRARY) LOCAL_SRC_FILES := $(LOCAL_PATH)/../../native_libs/$(TARGET_ARCH)/libgnustl_shared.so include $(PREBUILT_SHARED_LIBRARY)
The conflict I received was as follows:
Android NDK: Trying to define local module 'gnustl_shared' in jni / Android.mk.
Android NDK: But this module was already defined by c: / android-ndk-r10d / sources / cxx-stl / gnu-libstdc ++ / Android.mk.
The reason is that I already used it as a static library . This was in Application.mk:
APP_STL: = gnustl_static
The solution was to change it to APP_STL := gnustl_shared , and then delete the LOCAL_MODULE := libgnustl_shared from Android.mk.
sashoalm
source share