Android学习之Build.xml文件

近日升级Android SDK至3.2版本,发现ant工具编译失败,仔细检查Build.xml后进行了重新编写,内容修正如下,希望对大家学习Ant有帮助。具体Build.xml内容如下:

具体演示工程参见:点击打开链接,注意积分有点高哦,嘿嘿。。。








	
	
	

	
	
	
	
	

	
	
	

	
	
		
	
	
	
	
	
	
	
	
	
	
	
	

	
	
	
	

	
	
	

	
	
	

	
	

	
	
	

	
	

	
	
	
	

	
	
	
	

	
	
	
	
	
	
	

	
	
	
	
	
	


	
	
		Creating output directories if needed...
		
		
	

	
		Creating output directories if needed...
		
		
		
		
		
	

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

	
	
	
		Compiling aidl files into Java classes...
		
			
			
			
			
				
			
		
	

	
	
	
		Compiles project's .java files into .class files
		
			
				
				
			
		
	

	
	
		optimize classes are put to "${out.absolute.dir}"	.
		
		
		  
		    -injars					${out.absolute.dir}/temp.jar   
		    -outjars					${out.absolute.dir}/optimized.jar
		    -libraryjars				${jar.android}   
		  	-optimizationpasses 5
		  	-dontusemixedcaseclassnames
		  	-dontskipnonpubliclibraryclasses
		  	-dontpreverify
		  	-verbose
		  	-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
		  	-include proguard.cfg		  	
		  
		
		
		
		
		
	

	
	
		Converting compiled files and external libraries into ${out.absolute.dir}/${out.dex.file}    ...
		
			
			
			
			
		
		
	

	
	
		Packaging resources and assets ${out.resource.package.absolute.file}	...
		
			
			
			
			
			
			
			
			
			
			
			
			
		
	

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

	
	
	
		Packaging ${out.unsigned.package.absolute.file} for release...
		
			
			
			
			
			
			
			
			
			
			
		
		
	

	
	
		Zipalign ${out.aligned.package.absolute.file} for release...
		
			
			
			
			
			
		
		
	

	
	
		
			
		
		
	





你可能感兴趣的:(Android移动开发)