android Makefile把jar包打到apk里

  这个是经常的需求,我就是经常忘,关键不理解啊。

     反反复复的也看看了android makefile。 太复杂了。 慢慢来吧。哎。工作十年。啥也不会。咋整? 

  

#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := mdm

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_CERTIFICATE := platform
LOCAL_SDK_VERSION := current

LOCAL_PACKAGE_NAME := cjzang

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)

#臧春杰,  marvell,  honeywell 
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := mdm:libs/mdmframeworkclient.jar
include $(BUILD_MULTI_PREBUILT)

 

就仿照个样子写就好了。

mdm是什么? 无所谓,你写个 abcd也行。 关键是把下面的对应写好了。mdm:lib/****.jar  这里就是对应的具体jar包。就可以了。

原文地址:https://www.cnblogs.com/nan-jing/p/5820486.html