Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44490

Plugin does not work with Android build tools 26.0.2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • None
    • Mac Sierra 10.12.4
      Android Studio 2.3.1
      Jenkins 2.19.4
      android-emulator-plugin 2.15
      Android build tools 26.0.2

    Description

      After upgrading to android build tools 26.0.2, the plugin no longer works. Here are the logs we see

      [android] Starting Android emulator
      <PATH_TO_ANDROID_HOME>android/tools/emulator -engine classic -ports 5784,5785 -report-console tcp:5853,max=60 -avd ci-22 -no-snapshot-load -no-snapshot-save -no-audio -no-window
      PANIC: Missing emulator engine program for 'x86' CPU.
      [android] Emulator did not appear to start; giving up
      [android] Stopping Android emulator
      

      After digging into things, we found that Android have moved things around with the recent build tools and now the emulator tools are found at "android/emulator/" instead of "android/tools/emulator"

      So we changed the plugin code, in particular the AndroidEmulator class, to look for the emulator at the new path. Things started to improve a little, however now we get this....

      emulator: ERROR: could not connect to server on TCP:5868: Operation timed out
      

      The "-report-console" argument seems to be the problem. If this argument is left out the emulator starts ok, however the plugin can't interact with it and times out.

      [android] Emulator did not appear to start; giving up
      [android] Stopping Android emulator
      

      Any ideas?

      Regards,
      Dom

      Attachments

        Activity

          dominicmarmion Dominic Marmion created issue -
          dominicmarmion Dominic Marmion made changes -
          Field Original Value New Value
          Description After upgrading to android build tools 26.0.2, the plugin no longer works. Here are the logs we see
          {code}
          [android] Starting Android emulator
          <PATH_TO_ANDROID_HOME>android/tools/emulator -engine classic -ports 5784,5785 -report-console tcp:5853,max=60 -avd ci-22 -no-snapshot-load -no-snapshot-save -no-audio -no-window
          PANIC: Missing emulator engine program for 'x86' CPU.
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          After digging into things, we found that Android have moved things around with the recent build tools and now the emulator tools are found at "android/emulator/" instead of "android/tools/emulator"

          So we changed the plugin code, in particular the [AndroidEmulator|https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java] class, to look for the emulator at the new path. Things started to improve a little, however now we get this....

          {code}
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          The "-report-console" argument seems to be the problem. If this argument is left out the emulator starts ok, however the plugin can't interact with it and times out.

          Any ideas?

          Regards,
          Dom
          After upgrading to android build tools 26.0.2, the plugin no longer works. Here are the logs we see
          {code}
          [android] Starting Android emulator
          <PATH_TO_ANDROID_HOME>android/tools/emulator -engine classic -ports 5784,5785 -report-console tcp:5853,max=60 -avd ci-22 -no-snapshot-load -no-snapshot-save -no-audio -no-window
          PANIC: Missing emulator engine program for 'x86' CPU.
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          After digging into things, we found that Android have moved things around with the recent build tools and now the emulator tools are found at "android/emulator/" instead of "android/tools/emulator"

          So we changed the plugin code, in particular the [AndroidEmulator|https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java] class, to look for the emulator at the new path. Things started to improve a little, however now we get this....
          {code}
          [android] Emulator reported that the console is available on port 5,726
          [android] Waiting for emulator to finish booting...
          ERROR: Timeout after 90000 milliseconds
          {code}

          The "-report-console" argument seems to be the problem. If this argument is left out the emulator starts ok, however the plugin can't interact with it and times out.
          {code}
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          Any ideas?

          Regards,
          Dom
          dominicmarmion Dominic Marmion made changes -
          Description After upgrading to android build tools 26.0.2, the plugin no longer works. Here are the logs we see
          {code}
          [android] Starting Android emulator
          <PATH_TO_ANDROID_HOME>android/tools/emulator -engine classic -ports 5784,5785 -report-console tcp:5853,max=60 -avd ci-22 -no-snapshot-load -no-snapshot-save -no-audio -no-window
          PANIC: Missing emulator engine program for 'x86' CPU.
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          After digging into things, we found that Android have moved things around with the recent build tools and now the emulator tools are found at "android/emulator/" instead of "android/tools/emulator"

          So we changed the plugin code, in particular the [AndroidEmulator|https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java] class, to look for the emulator at the new path. Things started to improve a little, however now we get this....
          {code}
          [android] Emulator reported that the console is available on port 5,726
          [android] Waiting for emulator to finish booting...
          ERROR: Timeout after 90000 milliseconds
          {code}

          The "-report-console" argument seems to be the problem. If this argument is left out the emulator starts ok, however the plugin can't interact with it and times out.
          {code}
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          Any ideas?

          Regards,
          Dom
          After upgrading to android build tools 26.0.2, the plugin no longer works. Here are the logs we see
          {code}
          [android] Starting Android emulator
          <PATH_TO_ANDROID_HOME>android/tools/emulator -engine classic -ports 5784,5785 -report-console tcp:5853,max=60 -avd ci-22 -no-snapshot-load -no-snapshot-save -no-audio -no-window
          PANIC: Missing emulator engine program for 'x86' CPU.
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          After digging into things, we found that Android have moved things around with the recent build tools and now the emulator tools are found at "android/emulator/" instead of "android/tools/emulator"

          So we changed the plugin code, in particular the [AndroidEmulator|https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java] class, to look for the emulator at the new path. Things started to improve a little, however now we get this....
          {code}
          emulator: ERROR: could not connect to server on TCP:5868: Operation timed out
          {code}

          The "-report-console" argument seems to be the problem. If this argument is left out the emulator starts ok, however the plugin can't interact with it and times out.
          {code}
          [android] Emulator did not appear to start; giving up
          [android] Stopping Android emulator
          {code}

          Any ideas?

          Regards,
          Dom
          orrc Christopher Orr made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          orrc Christopher Orr made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            orrc Christopher Orr
            dominicmarmion Dominic Marmion
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: