Use Google Apis SDK Add-on via Target ID fails

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major
    • None
    • Environment:
      Ubuntu Server x64, Running Jenkins stand-alone, Matrix build, using maven.

      I want to run a Matrix Job with Google Apis for instrumentation tests
      Simply using the name from the "android list target" command like "Google Inc.:Google APIs:7" leads to problems in the build because of the spaces in the name.

      When trying to use the target id it gives me mixed results, the plugin seems not to recognize the id.

      For example, from the Konsole output:
      First, using id 27, which stands for "Google Inc.:Google APIs:15" in my environment

      $ /opt/android-sdk-linux/tools/android list target
      [android] The configured Android platform needs to be installed: 27
      [android] Installing the '27' SDK component(s)...
      $ /opt/android-sdk-linux/tools/android update sdk -o -u -t 27
      Error: Flag '-o' is not valid for 'update sdk'.
      [...]
      [android] Using Android SDK: /opt/android-sdk-linux
      [android] Creating Android AVD: /var/lib/jenkins/.android/avd/hudson_de-DE_120_WVGA_27.avd
      [android] Setting hardware properties:
      

      This build ultimately succeeds, although no sdk can be installed.

      Second, using id 6, which stands for "Google Inc.:Google APIs:7" in my environment

      [android] The configured Android platform needs to be installed: android-6
      [android] Installing the 'android-6' SDK component(s)...
      Error: Flag '-o' is not valid for 'update sdk'.
      [android] Creating Android AVD: /var/lib/jenkins/.android/avd/hudson_de-DE_120_WVGA_android-6.avd
      [android] Failed to run AVD creation command
      	Error: Target id is not valid. Use 'android list targets' to get the target ids.
      

      This build fails, because no Android 6 is not available locally.

      Now, the use of ids would only be a workaround, as the ids are dependent on the sdk installation.
      But failing a way to replace the whitespaces in the name, it would be nice if the plugin would use the ids in the correct way when calling the android cli tools.
      When parsing the output from list targets, the plugin should recognize target ids.

            Assignee:
            Christopher Orr
            Reporter:
            David Müller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: