Android assets not packaged in apk file

I am using 9M1 and am building an Android application that makes use of assets.  When I build the apk application for deployment from IntelliJ, it does NOT include these asset files like the Eclipse plugin does.  I followed the convention of placing them at the same level as src and res as the android SDK documentation describes.

2 comments
Comment actions Permalink

I just tried the latest Maia build 10666 and it looks like this issue has been fixed, but now I get the below exception.  So now I am stuck.  Both 9M1 and 10666 are bad for different reasons.

Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(249,183),absolute(2900,673),button=1,modifiers=Button1,clickCount=1] on dialog1
java.lang.AssertionError
    at com.android.sdklib.avd.AvdManager.getImageRelativePath(AvdManager.java:668)
    at com.android.sdklib.avd.AvdManager.setImagePathProperties(AvdManager.java:1284)
    at com.android.sdklib.avd.AvdManager.createAvd(AvdManager.java:511)
    at org.jetbrains.android.run.CreateAvdDialog.doOKAction(CreateAvdDialog.java:243)
    at com.intellij.openapi.ui.DialogWrapper$OkAction.actionPerformed(DialogWrapper.java:1040)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6216)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5981)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:261)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:49)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:242)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1051)
    at java.awt.Dialog$3.run(Dialog.java:1103)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1101)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:24)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:141)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:935)
    at org.jetbrains.android.run.AndroidRunningState.chooseAvd(AndroidRunningState.java:199)
    at org.jetbrains.android.run.AndroidRunningState.run(AndroidRunningState.java:215)
    at org.jetbrains.android.run.AndroidRunningState.execute(AndroidRunningState.java:88)
    at com.intellij.execution.impl.DefaultJavaProgramRunner.doExecute(DefaultJavaProgramRunner.java:0)
    at com.intellij.execution.runners.GenericProgramRunner$1.run(GenericProgramRunner.java:79)
    at com.intellij.execution.impl.ExecutionManagerImpl$1.run(ExecutionManagerImpl.java:14)
    at com.intellij.execution.impl.ExecutionManagerImpl.compileAndRun(ExecutionManagerImpl.java:4)
    at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:103)
    at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:54)
    at com.intellij.execution.ExecutionUtil.executeConfiguration(ExecutionUtil.java:29)
    at com.intellij.execution.ExecutorRegistryImpl$ExecutorAction.actionPerformed(ExecutorRegistryImpl.java:5)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:99)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:33)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:135)
    at java.awt.Component.processEvent(Component.java:5981)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:261)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:49)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:242)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



java.lang.NullPointerException
    at org.jetbrains.android.run.AndroidRunningState.chooseAvd(AndroidRunningState.java:201)
    at org.jetbrains.android.run.AndroidRunningState.run(AndroidRunningState.java:215)
    at org.jetbrains.android.run.AndroidRunningState.execute(AndroidRunningState.java:88)
    at com.intellij.execution.impl.DefaultJavaProgramRunner.doExecute(DefaultJavaProgramRunner.java:0)
    at com.intellij.execution.runners.GenericProgramRunner$1.run(GenericProgramRunner.java:79)
    at com.intellij.execution.impl.ExecutionManagerImpl$1.run(ExecutionManagerImpl.java:14)
    at com.intellij.execution.impl.ExecutionManagerImpl.compileAndRun(ExecutionManagerImpl.java:4)
    at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:103)
    at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:54)
    at com.intellij.execution.ExecutionUtil.executeConfiguration(ExecutionUtil.java:29)
    at com.intellij.execution.ExecutorRegistryImpl$ExecutorAction.actionPerformed(ExecutorRegistryImpl.java:5)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:99)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:33)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:135)
    at java.awt.Component.processEvent(Component.java:5981)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:261)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:49)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:242)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

0
Comment actions Permalink

If I manually created an AVD using the android SDK command line tools first, then I was able to workaround this crash:

android list targets

Available Android targets:
id: 1
     Name: Android 1.1
     Type: Platform
     API level: 2
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id: 2
     Name: Android 1.5
     Type: Platform
     API level: 3
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id: 3
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Description: Android + Google APIs
     Based on Android 1.5 (API level 3)
     Libraries:
      * com.google.android.maps (maps.jar)
          API for Google Maps
     Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P

android create avd -n Simulator -t 2

0

Please sign in to leave a comment.