Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I run android command I take following exception in bash, but it's everything ok with sudo.

at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1387)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1366)
at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:315)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:325)
at com.android.sdkuilib.internal.repository.UpdaterData.initSdk(UpdaterData.java:266)
at com.android.sdkuilib.internal.repository.UpdaterData.<init>(UpdaterData.java:123)
at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.<init>(SdkUpdaterWindowImpl2.java:104)
at com.android.sdkuilib.repository.SdkUpdaterWindow.<init>(SdkUpdaterWindow.java:87)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:339)
at com.android.sdkmanager.Main.doAction(Main.java:322)
at com.android.sdkmanager.Main.run(Main.java:119)
at com.android.sdkmanager.Main.main(Main.java:102)

Usually the problem is in the lack of java, but java -version works fine. Looks like that android have no permissions to use java, but how it could be? Same thing with Apple and Oracle Java.

P.S. MacOS 10.7.5

share|improve this question
I'm not sure whether a NullPointerException can be thrown due to lack of required permissions. –  Karan Feb 2 '13 at 18:26
I don't try to run my java program, I launch 'android' from android-sdk. I don't think that problem is in it's code. –  kaspartus Feb 2 '13 at 18:31

1 Answer 1

up vote 0 down vote accepted

I have no idea why android command successfully run with sudo but I find a solution.

Scheme to solve this issue: (paths for MacOS 10.7.5)

  1. Check that JDK installed. /Library/Java/JavaVirtualMachines
  2. Open ~/.android/avd - this is a folder with avds(there was no one of .avd for me and I just removed corresponding .ini)

In this exception we can find that problem in parseAvdInfo. (In 21.0.1 sdk tools version this issue isn't solved, and android throws this exception. May be later the solution is in the update android sdk)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.