diff --git a/plugin/protocols/proj.android/jni/Application.mk b/plugin/protocols/proj.android/jni/Application.mk index 750687880a..893b67fcc4 100644 --- a/plugin/protocols/proj.android/jni/Application.mk +++ b/plugin/protocols/proj.android/jni/Application.mk @@ -2,6 +2,6 @@ APP_STL := gnustl_static APP_CPPFLAGS += -frtti APP_MODULES := PluginProtocolStatic -APP_ABI :=armeabi +APP_ABI :=armeabi armeabi-v7a #APP_ABI :=x86 #APP_ABI :=mips mips-r2 mips-r2-sf armeabi diff --git a/plugin/tools/toolsForPublish/genPrebuildMK.sh b/plugin/tools/toolsForPublish/genPrebuildMK.sh index 461d490620..222754f6a3 100755 --- a/plugin/tools/toolsForPublish/genPrebuildMK.sh +++ b/plugin/tools/toolsForPublish/genPrebuildMK.sh @@ -23,7 +23,7 @@ LIB_FILENAME=${LIB_FILENAME}.a echo "" >> ${TARGET_FILE_NAME} -echo "LOCAL_SRC_FILES := ./"${LIB_FILENAME} >> ${TARGET_FILE_NAME} +echo "LOCAL_SRC_FILES := ./lib/"\$\(TARGET_ARCH_ABI\)/${LIB_FILENAME} >> ${TARGET_FILE_NAME} echo "LOCAL_EXPORT_C_INCLUDES := \$(LOCAL_PATH)/../include \$(LOCAL_PATH)" >> ${TARGET_FILE_NAME} echo "LOCAL_EXPORT_LDLIBS := -llog" >> ${TARGET_FILE_NAME} diff --git a/plugin/tools/toolsForPublish/publishPlugin.sh b/plugin/tools/toolsForPublish/publishPlugin.sh index f26b88a121..373811d4ac 100755 --- a/plugin/tools/toolsForPublish/publishPlugin.sh +++ b/plugin/tools/toolsForPublish/publishPlugin.sh @@ -122,7 +122,16 @@ if [ -f $BUILD_NATIVE_SCRIPT ]; then #invoke ndk build for plugin project ./build_native.sh LIB_FILE="$(getLibraryFileName)" - cp -rf "${ANDROID_PROJ_DIR}/obj/local/armeabi/${LIB_FILE}" "${TARGET_DIR}/android" + for File in ${ANDROID_PROJ_DIR}/obj/local/* + do + if [ -d $File ]; then + if [ -f "${File}"/${LIB_FILE} ]; then + ABI_NAME=`basename "${File}"` + mkdir -p "${TARGET_DIR}/android/lib/${ABI_NAME}" + cp -rf "${File}/${LIB_FILE}" "${TARGET_DIR}/android/lib/${ABI_NAME}" + fi + fi + done #generate mk file for prebuild ${PLUGIN_ROOT}/tools/toolsForPublish/genPrebuildMK.sh ${ANDROID_PROJ_DIR}/jni/Android.mk ${TARGET_DIR}/android/Android.mk