Loading...
Logo
Processing Forum
Hi,
I've been trying to install Android module for serveral times, deleting modes directory, restarting program, etc, on my processing 2.0 x64 for my windows 7 OS. This is the error lines in console when installation fails:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicProgressBarUI.updateSizes(BasicProgressBarUI.java:471)
    at javax.swing.plaf.basic.BasicProgressBarUI.getBox(BasicProgressBarUI.java:428)
    at com.sun.java.swing.plaf.windows.WindowsProgressBarUI.getBox(WindowsProgressBarUI.java:225)
    at com.sun.java.swing.plaf.windows.WindowsProgressBarUI.paintIndeterminate(WindowsProgressBarUI.java:279)
    at javax.swing.plaf.basic.BasicProgressBarUI.paint(BasicProgressBarUI.java:393)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
    at javax.swing.JComponent.paintComponent(JComponent.java:760)
    at javax.swing.JComponent.paint(JComponent.java:1037)
    at javax.swing.JComponent.paintChildren(JComponent.java:870)
    at javax.swing.JComponent.paint(JComponent.java:1046)
    at javax.swing.JComponent.paintChildren(JComponent.java:870)
    at javax.swing.JComponent.paint(JComponent.java:1046)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5132)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1491)
    at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1422)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5080)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4890)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:786)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
    at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
    at java.awt.EventQueue.access$400(EventQueue.java:81)
    at java.awt.EventQueue$2.run(EventQueue.java:627)
    at java.awt.EventQueue$2.run(EventQueue.java:625)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
    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)
Could not delete d:\Users\daniel\Documents\Processing\modes\mode16783250833882606tmp\AndroidMode\mode\AndroidMode.jar
Could not delete d:\Users\daniel\Documents\Processing\modes\mode16783250833882606tmp\AndroidMode\mode
Could not delete d:\Users\daniel\Documents\Processing\modes\mode16783250833882606tmp\AndroidMode
Could not delete d:\Users\daniel\Documents\Processing\modes\mode16783250833882606tmp

Could someone tells me how can be solved this?

Replies(11)

There is a similar thread about installing the JavaScript mode: https://forum.processing.org/topic/add-mode-in-processing-2-0b9

The solution there was to download the module manually and un-zip it into the modules directory manually. Not sure where to download the android module from though
Hi,

I'm very new here, first post, and don't necessarily know what I'm doing, but after a bit of hunting around, I found the following zip file on github:  http://android.processing.org/AndroidMode.zip.

I got it from here, and it looks a little old (if 2 months can be considered old):   https://github.com/processing/processing-android/blob/43bb2a96382537e137a0f346acc2b564a725c2e6/mode.properties

I just extracted everything to C:\Users\"my_name"\Documents\Processing\modes and restarted the Processing application. I was then able to choose Android from the dropdown and it prompted me to select the location of the android SDK. It seems to work....

Unfortunately although the code I'm trying from this tutorial ( http://www.processing.org/tutorials/android/) appears to compile it doesn't manage to start the virtual android device, although it has created one. It might be because I actually partly followed the SDK installation instructions on this wiki instead:  http://wiki.processing.org/w/Android#Troubleshooting.2C_Discussion.2C_and_Known_Issues


If you get further, please let me know ;-)

Hi roboticus,
your reply has been the best to solve the first problem. But now I have another problem.
Android app doesn't starts never. Neither, in emulator or in a real device. It keeps in a "death" status and after a while it appears the message "Lost connection with device while launching. Try again." And the debug information contains "Shutting down any existing adb server...".
Could anybody helps me?
Thank you!
Just a quick update. I managed to get both the Android Virtual Machine and my Galaxy Note II connected and running the sample code, so it looks like the zip I linked to in my previous post did the trick  .

how you do? Mine only stay waiting for device and in the end appear one message that says lost the connction :( 
I was initially getting the same lost connection message, I can't remember the exact steps that fixed it, but I think it was adding the path to the android SDK, in my case `android.sdk.path=C:\Program Files (x86)\Android\android-sdk', to the end of the preferences.txt file.

You can get access to this from within Processing by choosing File>Preferences and than clicking on the link at the bottom of the dialog where it says 'More preferences can be edited directly in the file'. This allowed me to start running the android virtual machine running. 

I then needed to change the USB drivers to the Google ones as per the android website:  http://developer.android.com/tools/extras/oem-usb.html, although I think I've now switched them back to the Samsung OEM drivers, and it all seems to be working. I assume that actually following the steps on the OEM USB drivers page actually caused a scan for new hardware and added some new drivers to work with the USB Debugging features enabled on my phone.

I think I got most of this information from the android wiki:  http://wiki.processing.org/w/Android and this other really helpful post:  https://forum.processing.org/topic/android-problems

Hope this helps.




Still nothing :x I try open manually the device and debug but appear the same message
I can only suggest two things - as i said in my opening post, I'm very new to Processing.

1) did you close processing before adding the path to the SDK? I work for a software company, and 90% of errors are fixed by turning things off and on again.
2) I also installed the basic " Use an Existing IDE" SDK install, as per the wiki: http://wiki.processing.org/w/Android#Instructions), rather than using the original install everything as described in the tutorial http://www.processing.org/tutorials/android/. The setup seemed to integrate more with Windows, including things like adding a shortcut to the start menu.


It's a serious bug in 2.0...

Rolf
FYI, if you want the developers to know about issues with Processing, post here:  https://github.com/processing/processing/issues?state=open
whoops!


I didn't see the note on the front page that said " Active development has  moved to Github"

I assume this is the correct place to add bug feedback:  https://github.com/processing/processing/issues/1781

It's the same issue being reported for Java Script Mode, but the symptoms are identical to the ones I saw with Android Mode.