Closed GoogleCodeExporter closed 9 years ago
Possibly related with Issue 362 and Issue 249.
Original comment by basskrap...@gmail.com
on 8 Oct 2013 at 2:04
Ok found it in the changelogs, this is a feature implemented in 3.5.1. Issue 270
So it behaves like specified but we need a additional waiting time to wait
until the OS has booted. Is it possible to add a second parameter like
"waitForBoot"?
Original comment by basskrap...@gmail.com
on 8 Oct 2013 at 2:17
This cause my tests fail too. Any idea about how to ask the Maven to wait until
the emulator is ready?
Original comment by hqfk...@gmail.com
on 26 Nov 2013 at 7:00
I'm using a ant task as a workaround. After starting up the emulator, it just
waits for a specified time until it starts the integration tests.
Be careful to wait for the emulator before entering the pre-integration-test
phase, it seems the instrumentation produces sporadic errors if the emulator is
not booted up completly.
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<!-- enable integration tests, these will be executed in the integration-test phase -->
<testSkip>false</testSkip>
<test>
<createReport>true</createReport>
</test>
<device>${android.avd}</device>
<emulator>
<avd>${android.avd}</avd>
<wait>${android.avd.wait.startup}</wait>
<!-- http://developer.android.com/tools/help/emulator.html -->
<options>-noaudio -no-boot-anim -no-window -memory 512</options>
</emulator>
</configuration>
<executions>
<execution>
<id>startEmulator</id>
<phase>package</phase>
<goals>
<goal>emulator-start</goal>
</goals>
</execution>
<execution>
<id>stopEmulator</id>
<phase>post-integration-test</phase>
<goals>
<goal>emulator-stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Workaround for android bootup. -->
<!-- Ticket for this issue: http://code.google.com/p/maven-android-plugin/issues/detail?id=421 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<echo message="Sleeping ${android.avd.wait.boot}s to wait for Android bootup..."/>
<sleep seconds="${android.avd.wait.boot}"/>
</tasks>
</configuration>
<executions>
<execution>
<id>wait</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Original comment by basskrap...@gmail.com
on 27 Nov 2013 at 10:06
Thanks for the workaround. It successfully makes the maven wait the specified
time. However, it appears that the unlock emulator in the emulator-start goal
is not get executed. I am using -Dandroid.emulatorUnlock=true to pass that
boolean parameter in the maven command line. Any idea?
Thanks again. And Happy Thanksgiving!
Original comment by hqfk...@gmail.com
on 27 Nov 2013 at 3:07
Sorry, no idea about unlocking the screen :(
Original comment by basskrap...@gmail.com
on 27 Nov 2013 at 3:26
We are no longer using the issue tracking system on Google Code. Please refile
this issue on https://github.com/jayway/maven-android-plugin/issues if you
still have this problem with the latest release of the Android Maven Plugin
Original comment by mosa...@gmail.com
on 19 May 2014 at 4:20
Original issue reported on code.google.com by
basskrap...@gmail.com
on 8 Oct 2013 at 1:59