android在线更新的SDK的脚本,
来源:技术人生 责任编辑:栏目编辑 发表时间:2013-07-01 04:28 点击:次
此脚本是针对于android在线更新的SDK,以前android有离线安装包,后来改为直接在线安装进行,两者的成本在于sdk的路径和一些工具类的路径不同。
此脚本用于进行自动编译用户需要的APK安装包,使用时候,请将签名用的*.keystore放在和build.xml同一目录,并命名为android.keystore,(如想更改,请在build.xml 中的jarsigner target进行更改)
build.properties
Java代码
android.tools=${sdk.folder}tools
android_version=2.1
apk.sdk.home=D\:/androidsdktools/android-sdk_r04-windows/android-sdk-windows/
apk.tools=${apk.sdk.home}tools/
application.package=com.test.testname
bin.dir=${jde.home}bin
app.name=NewAndroid
app.source.path=G\:/test/
jdk.home=C\:/Java_1.6_U18/jdk1.6.0_18/
output.dir=../outputDir
password=123456
sdk.folder=D\:/androidsdktools/android-sdk_r04-windows/android-sdk-windows/platforms/android-2.0.1/
temp.dir=127980239039628
Build.xml
Xml代码
<?xml version="1.0" encoding="UTF-8"?>
<project name="Test" default="debug" basedir=".">
<property file="build.properties">
</property>
<!-- The intermediates directory -->
<!-- Eclipse uses "bin" for its own output, so we do the same. -->
<property name="outdir" value="bin" />
<!-- ************************************************************************************* -->
<!-- No user servicable parts below. -->
<property name="android-framework" value="${sdk.folder}/framework.aidl" />
<!-- Input directories -->
<property name="resource-dir" value="res" />
<property name="asset-dir" value="assets" />
<property name="srcdir" value="src" />
<condition property="srcdir-ospath" value="${basedir}\${srcdir}" else="${basedir}/${srcdir}">
<os family="windows" />
</condition>
<property name="external-libs" value="libs" />
<condition property="external-libs-ospath" value="${basedir}\${external-libs}" else="${basedir}/${external-libs}">
<os family="windows" />
</condition>
<!-- Output directories -->
<property name="outdir-classes" value="${outdir}/classes" />
<condition property="outdir-classes-ospath" value="${basedir}\${outdir-classes}" else="${basedir}/${outdir-classes}">
<os family="windows" />
</condition>
<condition property="zipalign-package-ospath" value="${basedir}\${output.dir}\${app.name}_for_android_${android_version}_${temp.dir}.apk" else="${basedir}/${output.dir}">
<os family="windows" />
</condition>
<!-- Create R.java in the source directory -->
<property name="outdir-r" value="src" />
<!-- Intermediate files -->
<property name="dex-file" value="classes.dex" />
<property name="intermediate-dex"
此脚本用于进行自动编译用户需要的APK安装包,使用时候,请将签名用的*.keystore放在和build.xml同一目录,并命名为android.keystore,(如想更改,请在build.xml 中的jarsigner target进行更改)
build.properties
Java代码
android.tools=${sdk.folder}tools
android_version=2.1
apk.sdk.home=D\:/androidsdktools/android-sdk_r04-windows/android-sdk-windows/
apk.tools=${apk.sdk.home}tools/
application.package=com.test.testname
bin.dir=${jde.home}bin
app.name=NewAndroid
app.source.path=G\:/test/
jdk.home=C\:/Java_1.6_U18/jdk1.6.0_18/
output.dir=../outputDir
password=123456
sdk.folder=D\:/androidsdktools/android-sdk_r04-windows/android-sdk-windows/platforms/android-2.0.1/
temp.dir=127980239039628
Build.xml
Xml代码
<?xml version="1.0" encoding="UTF-8"?>
<project name="Test" default="debug" basedir=".">
<property file="build.properties">
</property>
<!-- The intermediates directory -->
<!-- Eclipse uses "bin" for its own output, so we do the same. -->
<property name="outdir" value="bin" />
<!-- ************************************************************************************* -->
<!-- No user servicable parts below. -->
<property name="android-framework" value="${sdk.folder}/framework.aidl" />
<!-- Input directories -->
<property name="resource-dir" value="res" />
<property name="asset-dir" value="assets" />
<property name="srcdir" value="src" />
<condition property="srcdir-ospath" value="${basedir}\${srcdir}" else="${basedir}/${srcdir}">
<os family="windows" />
</condition>
<property name="external-libs" value="libs" />
<condition property="external-libs-ospath" value="${basedir}\${external-libs}" else="${basedir}/${external-libs}">
<os family="windows" />
</condition>
<!-- Output directories -->
<property name="outdir-classes" value="${outdir}/classes" />
<condition property="outdir-classes-ospath" value="${basedir}\${outdir-classes}" else="${basedir}/${outdir-classes}">
<os family="windows" />
</condition>
<condition property="zipalign-package-ospath" value="${basedir}\${output.dir}\${app.name}_for_android_${android_version}_${temp.dir}.apk" else="${basedir}/${output.dir}">
<os family="windows" />
</condition>
<!-- Create R.java in the source directory -->
<property name="outdir-r" value="src" />
<!-- Intermediate files -->
<property name="dex-file" value="classes.dex" />
<property name="intermediate-dex"
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>