android .mk 引用第三方jar包(参考 Calculator )

dengpei@dengpei-pc:~/git/gingerbread/packages/apps/Calculator$ tree
.
|-- AndroidManifest.xml
|-- Android.mk
|-- arity-2.1.2.jar

|-- CleanSpec.mk
|-- MODULE_LICENSE_APACHE2
|-- NOTICE
|-- res
|   |-- drawable
|   |   |-- blue_button.xml
|   |   `-- button.xml
|   |-- drawable-hdpi
|   |   |-- advanced.png
|   |   |-- clear_history.png
|   |   |-- icon.png
|   |   `-- simple.png
|   |-- drawable-mdpi
|   |   |-- advanced.png
|   |   |-- clear_history.png
|   |   |-- icon.png
|   |   `-- simple.png
|   |-- layout-land
|   |   |-- history_item.xml
|   |   `-- main.xml
|   |-- layout-port
|   |   |-- history_item.xml
|   |   `-- main.xml
|   |-- values
|   |   |-- colors.xml
|   |   |-- strings.xml
|   |   `-- styles.xml
|   |-- values-ar
|   |   `-- strings.xml
|   |-- values-bg
|   |   `-- strings.xml
|   |-- values-ca
|   |   `-- strings.xml
|   |-- values-cs
|   |   `-- strings.xml
|   |-- values-da
|   |   `-- strings.xml
|   |-- values-de
|   |   `-- strings.xml
|   |-- values-el
|   |   `-- strings.xml
|   |-- values-en-rGB
|   |   `-- strings.xml
|   |-- values-es
|   |   `-- strings.xml
|   |-- values-es-rUS
|   |   `-- strings.xml
|   |-- values-fa
|   |   `-- strings.xml
|   |-- values-fi
|   |   `-- strings.xml
|   |-- values-fr
|   |   `-- strings.xml
|   |-- values-hr
|   |   `-- strings.xml
|   |-- values-hu
|   |   `-- strings.xml
|   |-- values-in
|   |   `-- strings.xml
|   |-- values-it
|   |   `-- strings.xml
|   |-- values-iw
|   |   `-- strings.xml
|   |-- values-ja
|   |   `-- strings.xml
|   |-- values-ko
|   |   `-- strings.xml
|   |-- values-lt
|   |   `-- strings.xml
|   |-- values-lv
|   |   `-- strings.xml
|   |-- values-nb
|   |   `-- strings.xml
|   |-- values-nl
|   |   `-- strings.xml
|   |-- values-pl
|   |   `-- strings.xml
|   |-- values-pt
|   |   `-- strings.xml
|   |-- values-pt-rPT
|   |   `-- strings.xml
|   |-- values-rm
|   |   `-- strings.xml
|   |-- values-ro
|   |   `-- strings.xml
|   |-- values-ru
|   |   `-- strings.xml
|   |-- values-sk
|   |   `-- strings.xml
|   |-- values-sl
|   |   `-- strings.xml
|   |-- values-sr
|   |   `-- strings.xml
|   |-- values-sv
|   |   `-- strings.xml
|   |-- values-th
|   |   `-- strings.xml
|   |-- values-tl
|   |   `-- strings.xml
|   |-- values-tr
|   |   `-- strings.xml
|   |-- values-uk
|   |   `-- strings.xml
|   |-- values-vi
|   |   `-- strings.xml
|   |-- values-zh-rCN
|   |   `-- strings.xml
|   `-- values-zh-rTW
|       `-- strings.xml
|-- src
|   `-- com
|       `-- android
|           `-- calculator2
|               |-- CalculatorDisplay.java
|               |-- CalculatorEditable.java
|               |-- Calculator.java
|               |-- ColorButton.java
|               |-- EventListener.java
|               |-- HistoryAdapter.java
|               |-- HistoryEntry.java
|               |-- History.java
|               |-- Logic.java
|               |-- PanelSwitcher.java
|               `-- Persist.java
`-- tests
    |-- AndroidManifest.xml
    |-- Android.mk
    `-- src
        `-- com
            `-- android
                `-- calculator2
                    |-- CalculatorHitSomeButtons.java
                    |-- CalculatorInstrumentationTestRunner.java
                    `-- tests
                        `-- CalculatorLaunchPerformance.java

58 directories, 80 files

dengpei@dengpei-pc:~/git/gingerbread/packages/apps/Calculator$


cat Android.mk

#
# 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 := libarity

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

LOCAL_SDK_VERSION := current

LOCAL_PACKAGE_NAME := Calculator

include $(BUILD_PACKAGE)
##################################################
include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libarity:arity-2.1.2.jar
include $(BUILD_MULTI_PREBUILT)

# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))


测试时发现 libarity 和其他的.mk引用包不能重名



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值