ant scripts to build apk file and load it in a emulator?

by » Mon, 19 Jul 2010 16:52:20 GMT

Sponsored Links

i am trying to create a build.xml script that cleans, builds and
creates a apk file of a Junit android test project that i have

the steps i want to achieve in my build file is this:

[list=]create apk file[/list]
[list=]Sign apk file[/list]
[list=]launch emulator[/list]
[list=]install apk file[/list]
[list=]run instrumentalTest[/list]
[list=]Save the tests into an HTML Junit Report[/list]

Anyone know how to achieve this? so far my build file looks like this:

[code]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply

create one in the same
directory with the processing instruction <?

as the first entry and export the buildfile again.

<project basedir="." default="build" name="Unity Agent SDK Test">
<property environment="env" />
<property name="junit.output.dir" value="junit" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.6" />
<property name="source" value="1.6" />
<property file="" />
<path id="android1.6.userclasspath">
<pathelement location="lib/android.jar" />
<path id="Junit.userclasspath">
<pathelement location="lib/junit-4.8.2" />
<pathelement location="lib/
org.hamcrest.core_1.1.0.v20090501071000.jar" />
<path id="Unity Agent SDK Test.classpath">
<pathelement location="bin" />
<pathelement location="lib/fb_connect-android-api.jar" />
<pathelement location="lib/signpost-commonshttp4-1.2.jar" />
<pathelement location="lib/signpost-core-1.2.jar" />
<pathelement location="lib/UnityAgentSDK.jar" />
<path refid="android1.6.userclasspath" />
<path refid="Junit.userclasspath" />

<path id="android.antlibs">
<pathelement path="${android-sdk-path}/tools/lib/anttasks.jar"
<pathelement path="${android-sdk-path}/tools/lib/sdklib.jar" />
path="${android-sdk-path}/tools/lib/androidprefs.jar" /
path="${android-sdk-path}/tools/lib/apkbuilder.jar" />
<pathelement path="${android-sdk-path}/tools/lib/jarutils.jar"

<path id="run.Unity Agent SDK Test (1).classpath">
<path refid="Unity Agent SDK Test.classpath" />
<path id="run.Unity Agent SDK Test (1).bootclasspath" />
<target name="init

Other Threads

1. onClick for ExpandableListAdapter

I would like to invoke a function when a child is clicked within a

The children are ViewHolders.

Below is my getChildView from myExpandableListAdapter class.

it reacts to Long clicks, but i can't figure out how to also get it to
react to a short click.


public View getChildView(int groupPosition, int childPosition,
                                boolean isLastChild, View convertView, 
ViewGroup parent) {

                        ViewHolder holder;
                        if (convertView == null) {
                                convertView = 
mInflater.inflate(R.layout.listview, null);
                                holder = new ViewHolder();
                                holder.text = (TextView) convertView
                                holder.text2 = (TextView) convertView
                                holder.text3 = (TextView) convertView
                        } else {
                                holder = (ViewHolder) convertView.getTag();


                        return convertView;


2. Want to write a forum reader


I've done some Android programming and 2 apps on the market. I'm now
thinking to write a simplified mobile reader for a forum. Can anyone
give me some light what is involve and generally how to do it?

1. What is it involve to do web sign in? http? any example/code
documentation to study?
2. Formating of forum message to the mobile edition?

General ideal which direction to find so I can do the research.



3. contact on SGS

4. Keunggulan Android dan Google

5. Test roti djahe on moto droid 1

6. Sansui MiniPad 7" LAN Problem

7. SQLite Encryption