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

by jrichards1...@googlemail.com » Mon, 19 Jul 2010 16:52:20 GMT


Sponsored Links
 i.

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
created.

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

[list=]clean[/list]
[list=]build[/list]
[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 <?

eclipse.ant.import?>
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="build.properties" />
<path id="android1.6.userclasspath">
<pathelement location="lib/android.jar" />
</path>
<path id="Junit.userclasspath">
<pathelement location="lib/junit-4.8.2" />
<pathelement location="lib/
org.hamcrest.core_1.1.0.v20090501071000.jar" />
</path>
<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>

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

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



Other Threads

1. If the bluetooth is build as module not build in, where is better to insmod it

Hi Pavan and Nick,

Thanks for the suggestions! Seems insmod in bluetooth.c is not a good
idea, it do increments the rfkill. I'll put it into init.rc first,
maybe build in finially.

Thanks again!


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Gears geolocation on G1

I've been chasing a bug for the last day in a browser application
using the Google Gears geolocation API. For background on this API if
you're unfamiliar, see http://code.google.com/apis/gears/api_geolocation.html.
The relevant aspect for now is that it allows retrieval of the
device's GPS coordinates in JavaScript, after asking the user's
permission.

Al least, it's supposed to ask permission - but on my G1, it doesn't.
The API just fails on a "permission denied" condition, without ever
asking. Everything works fine on every other Gears-enabled browser
I've tried: the page asks for permission, and after you grant it, the
geolocation works. Interestingly, it even works on the Android SDK's
emulator. Just not my G1.

So I'm posting this here for two reasons. First, I'm located in the
UK, so obviously my G1 is the UK version (firmware 1.1, TMI-RC9). If
someone could try this with a US G1 and report the results, that might
help narrow the problem down. A test on an ADP1 would also provide
another data point. Or another firmware version, if anyone has one.

My testing page can be found at http://gad.getpla.net/test/geobug.html
You don't need to grant the page permission to read your location if
you don't want to; I'm really just interested in whether or not it
asks.

Second, does anyone have a good idea who would own this bug? It's
apparently somewhere in the interface between Gears and Chrome-Lite,
but I'm not sure which side of that fence it actually comes down on.


--~--~---------~--~----~------------~-------~--~----~

3. How to control the SurfaceView's z-order

4. Implications of Using Non Standard Packages

5. Want to learn it to develop app

6. Can I add Linux Driver on the Gphone when I bought it?

7. Android Projects Promotion Pages Online!