android Makefile把jar包打到apk里
Posted 苏州
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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包。就可以了。
以上是关于android Makefile把jar包打到apk里的主要内容,如果未能解决你的问题,请参考以下文章
使用maven打包 lib下的jar进不去,手动把jar包打到本地,然后在用maven命令就可以啦
sping boot 如何将外部引入的jar包打到fat jar里面
解决:single failed: For artifact {null:null:null:jar}: The groupId cannot be empty. 把工程依赖的jar包打到入jar中