Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android AVD Manager: Can't create new device definition (java.lang.NullPointerException)

I'm running the newest version of Android SDK on Mac OS X 10.9.3. I haven't had the Android SDK or any other Java development environment installed on this machine before, so this could be considered a fresh install.

Nothing happens when attempting to create a new device definition using the AVD Manager, except for the following terminal output:

java.lang.NullPointerException
    at com.android.sdkuilib.internal.widgets.DeviceCreationDialog.okPressed(DeviceCreationDialog.java:916)
    at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.onNewDevice(DeviceManagerPage.java:658)
    at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.access$100(DeviceManagerPage.java:97)
    at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage$3.widgetSelected(DeviceManagerPage.java:215)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at com.android.sdkuilib.internal.repository.ui.AvdManagerWindowImpl1.open(AvdManagerWindowImpl1.java:146)
    at com.android.sdkuilib.repository.AvdManagerWindow.open(AvdManagerWindow.java:94)
    at com.android.sdkmanager.Main.showAvdManagerWindow(Main.java:437)
    at com.android.sdkmanager.Main.doAction(Main.java:379)
    at com.android.sdkmanager.Main.run(Main.java:150)
    at com.android.sdkmanager.Main.main(Main.java:116)

Here is a screenshot of the window:

The mentioned AVD Manager window

I have tried running the AVD Manager by using both android avd and android sdk with the same results. I am able to create a new AVD based on a generic device definition and that's it.

Is there something wrong on my side or did I run into some sort of a bug?

like image 381
aldavigdis Avatar asked Jul 08 '14 03:07

aldavigdis


People also ask

Why AVD Manager is not working?

SDK Build Tools are not installed If it fails then you may have to install it again. You look at the build tab at the bottom of the screen, it will display the error message and option to install the Build tools. Install it and you should be able to see the AVD Manager. Another way is to go to the SDK Manager.

How do you solve an error occurred while creating the AVD see idea log for details?

Fix is to give yourself root access and change the owner of the /home/shivam/. android folder to your username. Save this answer.

How do you reset AVD?

Android StudioGo to Tools > Android > AVD Manager. Select your emulator device. Click “Wipe data” Relaunch your emulator.


2 Answers

I had the same problem on Ubuntu 14.04. Didn't find any clean solution so far, but as a workaround try to clone an existing device and then edit its properties as you wish.

like image 199
Vlad Avatar answered Oct 25 '22 00:10

Vlad


This appears to be a bug in the framework as I ran into it using Eclipse Juno & ADT 23.0.2. Bug report is below.

https://code.google.com/p/android/issues/detail?id=73280

like image 25
birdman125 Avatar answered Oct 25 '22 00:10

birdman125