in ndk, I want to build library with the same MODULE name for different ABI from different source file.
I have two sources under dir: armeabi-v7a and arm64-v8a
Here is my Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := session
LOCAL_SRC_FILES := armeabi-v7a/libsession.so
TARGET_ARCH_ABI := armeabi-v7a
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := session
LOCAL_SRC_FILES := arm64-v8a/libsession.so
TARGET_ARCH_ABI := arm64-v8a
include $(PREBUILT_SHARED_LIBRARY)
Here is my Application.mk:
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
APP_ABI := armeabi-v7a arm64-v8a
APP_PLATFORM := android-21
but failes:
Android NDK: Trying to define local module 'session' in jni/Android.mk.
Android NDK: But this module was already defined by jni/Android.mk.
How to achieve that?