[ https://issues.jenkins-ci.org/browse/JENKINS-12821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159333#comment-159333 ]
Richard Mortimer commented on JENKINS-12821: -------------------------------------------- After adding some instrumentation to android-maven-plugin it seems that ddmlib.jar (the Android library that interfaces with the emulator/device) is not reporting the emulator as being an emulator. {code} [INFO] Waiting for initial device list from the Android Debug Bridge [INFO] Found 1 devices connected with the Android Debug Bridge [INFO] android.device parameter set to emulator [INFO] checking device=localhost_47048_unknown_sdk, port=58222, name=null, isEmulator=false {code} Looking at the ddmlib.jar source code the isEmulator method detects an emulator based on the serial number of the device. In particular it expects it to confirm to the following regexp pattern. {code} /** Emulator Serial Number regexp. */ final static String RE_EMULATOR_SN = "emulator-(\\d+)"; //$NON-NLS-1$ {code} android-emulator-plugin seems to use a different serial number format to manually launched emulator instances. Manual launched serial numbers resemble {{emulator-5554}} whereas the android emulator version is {{localhost:5554}}. So far I have not identified where the serial number is generated/set but it does look like this issue comes down to the serial number format. > android.device > --------------- > > Key: JENKINS-12821 > URL: https://issues.jenkins-ci.org/browse/JENKINS-12821 > Project: Jenkins > Issue Type: Bug > Components: android-emulator > Affects Versions: current > Reporter: Sebastian Schefczyk > Assignee: Richard Mortimer > Priority: Minor > > The following configuration of the android-maven-plugin will not find the > running emulator on Jenkins. > Commenting this line will find the emulator. > On my local machine this is working fine, but not in Jenkins. > Both machines use maven 3.0.4 on Linux/Ubuntu. > <groupId>com.jayway.maven.plugins.android.generation2</groupId> > <artifactId>android-maven-plugin</artifactId> > <configuration> > ... > <device>emulator</device> > ... > </configuration> > </plugin> > This configuration is useful on the local machine, if you are developing > while charging your phone via USB. > Best regards, that's a really nice plugin! > Sebl29 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira