• mk文件配置第三方jar包,so文件


    
    

    #-------------------------配置jar包---------------------

    LOCAL_STATIC_JAVA_LIBRARIES :=
      libphonenumber_7_0_3
      nineoldandroids
      zxing
      fastjson
      BaiduLBS_Android
      imageloader

    include $(CLEAR_VARS)
    LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES :=

      libphonenumber_7_0_3:libs/libphonenumber-7.0.3.jar

      nineoldandroids:libs/nineoldandroids-2.4.0.jar
      zxing:libs/ZXing-core-3.2.1.jar
      fastjson:libs/fastjson-1.2.9.jar   
      BaiduLBS_Android:libs/BaiduLBS_Android.jar
      imageloader:libs/imageloader1.9.2-SNAPSHOT-with-sources.jar

    include $(BUILD_MULTI_PREBUILT)

    #-------------------------配置jar包--------------------------

    #-------------配置so文件-------------------

    LOCAL_PREBUILT_JNI_LIBS := libs/armeabi/libstlport_shared.so
      libs/armeabi-v7a/libqchatqmi.so
      libs/armeabi-v7a/libqpic.so
      libs/armeabi/liblocSDK7.so
      libs/armeabi/libBaiduMapSDK_util_v4_0_0.so
      libs/armeabi/libBaiduMapSDK_search_v4_0_0.so
      libs/armeabi/libBaiduMapSDK_radar_v4_0_0.so
      libs/armeabi/libBaiduMapSDK_map_v4_0_0.so
      libs/armeabi/libBaiduMapSDK_cloud_v4_0_0.so
      libs/armeabi/libBaiduMapSDK_base_v4_0_0.so

    #-------------配置so文件-------------------

    ------------------------完整示例-------------------------

    LOCAL_PATH:= $(call my-dir)
    include $(CLEAR_VARS)
     
    LOCAL_MODULE_TAGS := optional
     
    src_dirs := src
    res_dirs := res
     
    LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
    LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
    LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets
    
    LOCAL_SRC_FILES += src/com/qualcomm/mastercontroller/aidl/IQChartHandle.aidl 
                       src/com/qualcomm/mastercontroller/aidl/ICommandClient.aidl
     
     
    LOCAL_JAVA_LIBRARIES := telephony-common
    LOCAL_STATIC_JAVA_LIBRARIES := 
        android-support-v4 
        libphonenumber_7_0_3 
        libYAGATTA 
        libQAAL 
        nineoldandroids 
        zxing 
        fastjson 
        BaiduLBS_Android 
        imageloader
    	  
    LOCAL_MULTILIB :=32
     
    LOCAL_PACKAGE_NAME := QChat
    LOCAL_CERTIFICATE := platform
    LOCAL_PROGUARD_ENABLED:= disabled
    LOCAL_PREBUILT_JNI_LIBS :=   libs/armeabi/libstlport_shared.so 
    								libs/armeabi-v7a/libqchatqmi.so 
    								libs/armeabi-v7a/libqpic.so 
    								libs/armeabi/liblocSDK7.so 
    								libs/armeabi/libBaiduMapSDK_util_v4_0_0.so 
    								libs/armeabi/libBaiduMapSDK_search_v4_0_0.so 
    								libs/armeabi/libBaiduMapSDK_radar_v4_0_0.so 
    								libs/armeabi/libBaiduMapSDK_map_v4_0_0.so 
    								libs/armeabi/libBaiduMapSDK_cloud_v4_0_0.so 
    								libs/armeabi/libBaiduMapSDK_base_v4_0_0.so
    
    include $(BUILD_PACKAGE)
     
     
     
    include $(CLEAR_VARS)
    LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := 
    	libYAGATTA:libs/YAGATTA_ADK-1.2.1.115.jar 
    	libQAAL:libs/qaal-1.0.1.117.jar 
    	nineoldandroids:libs/nineoldandroids-2.4.0.jar 
    	zxing:libs/ZXing-core-3.2.1.jar 
    	fastjson:libs/fastjson-1.2.9.jar 
    	libphonenumber_7_0_3:libs/libphonenumber-7.0.3.jar 
    	BaiduLBS_Android:libs/BaiduLBS_Android.jar 
    	imageloader:libs/imageloader1.9.2-SNAPSHOT-with-sources.jar
    	                                
    include $(BUILD_MULTI_PREBUILT)
     
    
    include $(call all-makefiles-under,$(LOCAL_PATH))
    

      

    mk文件中设置.so文件拷贝到system/lib

    ####### copy .so library to /system/lib #########################
    include $(CLEAR_VARS)
    LOCAL_MODULE := liblocSDK4_baidu.so
    LOCAL_MODULE_CLASS := SHARED_LIBRARIES
    LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
    LOCAL_SRC_FILES := libs/armeabi/$(LOCAL_MODULE)
    OVERRIDE_BUILD_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
    include $(BUILD_PREBUILT)

    
    
  • 相关阅读:
    IOS数据持久化之归档NSKeyedArchiver
    Java中导入、导出Excel
    IOS开发中多线程的使用
    深入分析动态管理Fragment
    IOS开发之数据sqlite使用
    如何在Eclipse和Tomcat的Debug过程中启用热部署
    在PHP中无法连接Memcached的解决办法
    Apache mod_rewrite规则重写的标志一览
    Java多线程中run(), start(), join(), wait(), yield(), sleep()的使用
    Centos5.8下编译安装PHP5.4和memcached, phalcon, yaf, apc
  • 原文地址:https://www.cnblogs.com/antoon/p/6596104.html
Copyright © 2020-2023  润新知