把第三方jar库加入android framework services

首先,已有一个库,譬如acssmc-1.1.4.jar,把这个库拷贝到一个合适的目录,./vendor/lentek/libs/acssmc (这是mtk的项目目录)

然后创建Android.mk如下:
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE = acssmc
LOCAL_MODULE_CLASS = JAVA_LIBRARIES
LOCAL_MODULE_SUFFIX = .jar
LOCAL_UNINSTALLABLE_MODULE = true
LOCAL_SRC_FILES = acssmc-1.1.4.jar
include $(BUILD_PREBUILT)

然后修改 frameworks/base/services/Android.mk,添加
LOCAL_STATIC_JAVA_LIBRARIES += acssmc
并重编services即可。
mmm frameworks/base/services
 

你可能感兴趣的:(android,framework)