Help with Sketch on Processing Android

I´ve made a drawing program on Processing Windows and it works just fine there. The sketch uses a lot of images. But now that I´m finished I wanted to make the sketch into an app. When I try to load the sketch on android however, it won`t even start. All I ever get is this error message:

java.lang.NullPointerException: Attempt to read from field ‘int processing.core.PImage.width’ on a null object reference
at processing.core.PGraphics.background(
at processing.core.PApplet.background(
at processing.test.testdrawing.TestDrawing.draw(
at processing.core.PApplet.handleDraw(
at processing.core.PSurfaceNone.callDraw(
at processing.core.PSurfaceNone$

Any help is appreciated

Is the issue with your sketch or with getting an Android app to run? That is, can you run any of the sample Android apps?

@Marci1432 ===

  • difficult to help without seeing code
  • difficult to understand what you have done - Writing an app with windows && java mode and trying to make it running with android or what?
  • the error seems to be with some var (array or int or) not instanciated
1 Like