java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by Erik Fahlén,
  • Jenkins fails my job on it's first attempt to unlock emulator screen * I'm using April 8th, 2016 Jenkins release plugin * Emulator used is Nexus5X - Android 6.0 - API23 I tried to see if someone else reported the issue already, but it seems I'm the only one so far. Thanks! Logs: -------------------------------------------------------------------------------------------------------------------------------------------------- [android] Emulator reported that the startup process is 'running' $ C:\android-sdk/platform-tools/adb.exe -s emulator-5726 wait-for-device shell getprop init.svc.bootanim [android] Emulator reported that the startup process is 'stopped' $ C:\android-sdk/platform-tools/adb.exe -s emulator-5726 logcat -v time [android] Attempting to unlock emulator screen FATAL: null java.lang.NullPointerException at hudson.plugins.android_emulator.AndroidEmulator.doSetUp(AndroidEmulator.java:436) at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:271) 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:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) --------------------------------------------------------------------------------------------------------------------------------------------------
    via by Marius Horvat,
  • Jenkins fails my job on it's first attempt to unlock emulator screen * I'm using April 8th, 2016 Jenkins release plugin * Emulator used is Nexus5X - Android 6.0 - API23 I tried to see if someone else reported the issue already, but it seems I'm the only one so far. Thanks! Logs: -------------------------------------------------------------------------------------------------------------------------------------------------- [android] Emulator reported that the startup process is 'running' $ C:\android-sdk/platform-tools/adb.exe -s emulator-5726 wait-for-device shell getprop init.svc.bootanim [android] Emulator reported that the startup process is 'stopped' $ C:\android-sdk/platform-tools/adb.exe -s emulator-5726 logcat -v time [android] Attempting to unlock emulator screen FATAL: null java.lang.NullPointerException at hudson.plugins.android_emulator.AndroidEmulator.doSetUp(AndroidEmulator.java:436) at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:271) 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:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) --------------------------------------------------------------------------------------------------------------------------------------------------
    via by Marius Horvat,
    • 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)
    No Bugmate found.