Android自动打包、签名、优化、上传ANT脚本

阅读更多

版权所有,欢迎转载,转载请注明 : SinFrancis  http://mdev.cc 

 

此脚本是针对于android在线更新的SDK,以前android有离线安装包,后来改为直接在线安装进行,两者的成本在于sdk的路径和一些工具类的路径不同。

此脚本用于进行自动编译用户需要的APK安装包,使用时候,请将签名用的*.keystore放在和build.xml同一目录,并命名为android.keystore,(如想更改,请在build.xml 中的jarsigner target进行更改)

build.properties

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



	
	

	
	
	

	
	

	

	
	
	
	
	
		
	

	
	
		
	

	
	
	
		
	

	
		
	
	
	

	
	
	
	
		
	

	
	
	
		
	

	
	
		
	

	
	
	
		
	
	
		
	

	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	

	

	

	
	
		Creating output directories if needed...
		
		
	

	
	
		Generating R.java / Manifest.java from the resources...
		
			
			
			
			
			
			
			
			
			
			
		
	

	
	
		Compiling aidl files into Java classes...
		
			
			
			
				
			
		
	

	
	
		
			
				
			
		
	

	
	
		Converting compiled files and external libraries into ${outdir}/${dex-file}...
		
			
			
			
			
		
	

	
	
		Packaging resources and assets...
		
			
			
			
			
			
			
			
			
			
			
			
			
		
	

	
	
		Packaging resources...
		
			
			
			
			
			
			
			
			
			
			
			
		
	

	
	
	
		
		
		
	

	
	
		Packaging ${out-debug-package}, and signing it with a debug key...
		
			
			
			
			
			
			
			
			
			
		
	

	
	
		Packaging ${out-unsigned-package} for release...
		
			
			
			
			
			
			
			
			
			
			
		
		It will need to be signed with jarsigner before being published.
	

	
	
		Installing ${out-debug-package} onto default emulator...
		
			
			
		
	

	
		Installing ${out-debug-package} onto default emulator...
		
			
			
			
		
	

	
	
		Uninstalling ${application.package} from the default emulator...
		
			
			
		
	

	
	
		
		
		
	
	
	
		
		
		
			
				
			
		
	
	
	
	
		
			
			
			
			
			
			
			
			
			
		
	
	
	
		
			
			
			
			
			
		
	
	
	
			
				
				
				
			
		

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(脚本,Android,Ant,OS,Windows)