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

NullPointerException when installing Android SDK

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Mac OS 10.11.6
      Jenkins 2.7.2
      Android Emulator Plugin 2.15

      I get a NullPointerException when trying to automatically install the Android SDK. The only other plugin I have added to Jenkins is the Node JS plugin.

      [android] No Android SDK found; let's install it automatically...
      [android] Going to install required Android SDK components...
      [android] Installing the 'platform-tool' SDK component(s)...
      $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android update sdk -u -a -t platform-tool
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 30: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 33: basename: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 40: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 44: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 48: basename: command not found
      $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android list sdk --extended
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 30: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 33: basename: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 40: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 44: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 48: basename: command not found
      [android] Installing the 'tool,extra-android-m2repository,extra-google-m2repository' SDK component(s)...
      $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android update sdk -u -a -t tool,extra-android-m2repository,extra-google-m2repository
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 30: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 33: basename: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 40: dirname: command not found
      /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android: line 44: dirname: command not found
      FATAL: null
      java.lang.NullPointerException
      at hudson.plugins.android_emulator.util.Utils.getToolCommand(Utils.java:398)
      at hudson.plugins.android_emulator.util.Utils.runAndroidTool(Utils.java:449)
      at hudson.plugins.android_emulator.util.Utils.runAndroidTool(Utils.java:442)
      at hudson.plugins.android_emulator.util.Utils.runAndroidTool(Utils.java:436)
      at hudson.plugins.android_emulator.SdkInstaller.isPlatformInstalled(SdkInstaller.java:311)
      at hudson.plugins.android_emulator.SdkInstaller.installPlatform(SdkInstaller.java:257)
      at hudson.plugins.android_emulator.SdkInstaller.installDependencies(SdkInstaller.java:242)
      at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:264)
      at hudson.model.Build$BuildExecution.doRun(Build.java:156)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Finished: FAILURE

            orrc Christopher Orr
            erfa Erik Fahlén
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: