Ant Command (Android)
来源:互联网 发布:php放到path 环境变量 编辑:程序博客网 时间:2024/05/16 12:59
通过Android SDK生成build.xml
D:\adt-bundle-windows-x86_64-20140321\sdk\tools>android update project --target 3 --subprojects --path <project_path>
如果引动第三方Android Library, 第三方也需要生成build.xml
D:\adt-bundle-windows-x86_64-20140321\sdk\tools>android update project --target 3 --path <third_party_project_path>
进入project, run command on CMD,
ant debug
在project的bin中生成debugXXX.apk.
<?xml version="1.0" encoding="UTF-8"?>
<project name="library_loginmodule2" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>
<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />
<target name="copy_resource" description="Apply different resource.">
<echo message="${basedir}"/>
<copy todir="${basedir}/res/drawable-hdpi" overwrite="true">
<fileset dir="${basedir}/XXXdrawable-hdpi">
</fileset>
</copy>
<copy todir="${basedir}/res/drawable-mdpi" overwrite="true">
<fileset dir="${basedir}/XXX/drawable-mdpi">
</fileset>
</copy>
<copy todir="${basedir}/res/drawable-xhdpi" overwrite="true">
<fileset dir="${basedir}/XXX/drawable-xhdpi">
</fileset>
</copy>
<copy todir="${basedir}/res/drawable-xxhdpi" overwrite="true">
<fileset dir="${basedir}/XXX/drawable-xxhdpi">
</fileset>
</copy>
<copy todir="${basedir}/res/values" overwrite="true">
<fileset dir="${basedir}/XXX/values">
</fileset>
</copy>
</target>
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>
ant copy_resource to run the target "copy_resource"
- Ant Command (Android)
- Ant command line arguments
- android command
- android command
- Android command
- ant android
- android ant
- ant android
- android ant
- android ANT
- jenkins打包报:ant:command not find
- 【ant】ANT打包Android应用
- android adb command
- Android adb shell command
- (Android) Monkey script command
- Android ADB Command
- Android:adb command
- android build document command
- HDU 2049 考新郎【错排】
- 【OpenCV入门教程之六】 创建Trackbar & 图像对比度、亮度值调整
- openlayers 例子分类
- Android网络编程(中)--- HttpClient
- 地图API哪个好用
- Ant Command (Android)
- 无法自动生成或更新R.java文件
- DSP-BIOS使用入门
- 高级for循环 实例
- linux中proc是什么
- Python中set、list、dict、tuple的比较
- 如此提高社交营销的效率
- 经纬财富:辽源白银投资中下单的两大技巧
- Cocos2d-x3.0模版容器详解之一:cocos2d::Vector<T>