From fc3c5ca0c1de1ee22670c9d7b349732270c3aa29 Mon Sep 17 00:00:00 2001 From: Poovizhi Date: Thu, 23 Mar 2017 18:07:29 +0530 Subject: [PATCH] [IOT-1955] Notification service fails to load libca-interface.so Changes are made to add libca-interface.so to service/notification. This library requires libresource_directory.so and hence added that. Changes added in build.gradle to avoid duplicates. Change-Id: I0a40aa9fdb726fb7a1e778ff63155d78ffde21f6 Signed-off-by: Poovizhi Reviewed-on: https://gerrit.iotivity.org/gerrit/18133 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- .../android/notification-service/src/main/jni/Android.mk | 7 +++++++ .../examples/android/NotiConsumerExample/app/build.gradle | 15 ++++++++++----- .../examples/android/NotiProviderExample/app/build.gradle | 15 ++++++++++----- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/service/notification/android/notification-service/src/main/jni/Android.mk b/service/notification/android/notification-service/src/main/jni/Android.mk index d3c63c6..8ba5ecc 100755 --- a/service/notification/android/notification-service/src/main/jni/Android.mk +++ b/service/notification/android/notification-service/src/main/jni/Android.mk @@ -30,6 +30,13 @@ LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libresource_directory.so include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) +OIC_LIB_PATH := $(ROOT_PATH)/out/android/$(TARGET_ARCH_ABI)/$(APP_OPTIM) +LOCAL_MODULE := ca-interface +LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libca-interface.so +include $(PREBUILT_SHARED_LIBRARY) + + +include $(CLEAR_VARS) LOCAL_MODULE := notification_consumer_jni LOCAL_CPPFLAGS := -std=c++0x -frtti -fexceptions LOCAL_LDLIBS := -llog diff --git a/service/notification/examples/android/NotiConsumerExample/app/build.gradle b/service/notification/examples/android/NotiConsumerExample/app/build.gradle index e4e47d3..fce4bbe 100755 --- a/service/notification/examples/android/NotiConsumerExample/app/build.gradle +++ b/service/notification/examples/android/NotiConsumerExample/app/build.gradle @@ -10,11 +10,16 @@ android { pickFirst 'lib/x86/libocstack-jni.so' pickFirst 'lib/x86_64/libocstack-jni.so' pickFirst 'lib/arm64-v8a/libocstack-jni.so' - exclude 'lib/armeabi/libresource_directory.so' - exclude 'lib/armeabi-v7a/libresource_directory.so' - exclude 'lib/x86/libresource_directory.so' - exclude 'lib/x86_64/libresource_directory.so' - exclude 'lib/arm64-v8a/libresource_directory.so' + pickFirst 'lib/armeabi/libca-interface.so' + pickFirst 'lib/armeabi-v7a/libca-interface.so' + pickFirst 'lib/x86/libca-interface.so' + pickFirst 'lib/x86_64/libca-interface.so' + pickFirst 'lib/arm64-v8a/libca-interface.so' + pickFirst 'lib/armeabi/libresource_directory.so' + pickFirst 'lib/armeabi-v7a/libresource_directory.so' + pickFirst 'lib/x86/libresource_directory.so' + pickFirst 'lib/x86_64/libresource_directory.so' + pickFirst 'lib/arm64-v8a/libresource_directory.so' } defaultConfig { diff --git a/service/notification/examples/android/NotiProviderExample/app/build.gradle b/service/notification/examples/android/NotiProviderExample/app/build.gradle index c6dcb72..2e2ba50 100755 --- a/service/notification/examples/android/NotiProviderExample/app/build.gradle +++ b/service/notification/examples/android/NotiProviderExample/app/build.gradle @@ -10,11 +10,16 @@ android { pickFirst 'lib/x86/libocstack-jni.so' pickFirst 'lib/x86_64/libocstack-jni.so' pickFirst 'lib/arm64-v8a/libocstack-jni.so' - exclude 'lib/armeabi/libresource_directory.so' - exclude 'lib/armeabi-v7a/libresource_directory.so' - exclude 'lib/x86/libresource_directory.so' - exclude 'lib/x86_64/libresource_directory.so' - exclude 'lib/arm64-v8a/libresource_directory.so' + pickFirst 'lib/armeabi/libca-interface.so' + pickFirst 'lib/armeabi-v7a/libca-interface.so' + pickFirst 'lib/x86/libca-interface.so' + pickFirst 'lib/x86_64/libca-interface.so' + pickFirst 'lib/arm64-v8a/libca-interface.so' + pickFirst 'lib/armeabi/libresource_directory.so' + pickFirst 'lib/armeabi-v7a/libresource_directory.so' + pickFirst 'lib/x86/libresource_directory.so' + pickFirst 'lib/x86_64/libresource_directory.so' + pickFirst 'lib/arm64-v8a/libresource_directory.so' } defaultConfig { -- 2.7.4