# Help with Sketch on Processing Android

**URL:** <https://discourse.processing.org/t/help-with-sketch-on-processing-android/13891>\
**Category:** Processing for Android\
**Created:** [September 9, 2019, 8:46am UTC](https://discourse.processing.org/t/help-with-sketch-on-processing-android/13891 "2019-09-09T08:46:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marci1432](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@Marci1432](https://discourse.processing.org/u/Marci1432)\
**Post date:** [September 9, 2019, 8:46am UTC](https://discourse.processing.org/t/help-with-sketch-on-processing-android/13891/1 "2019-09-09T08:46:54Z")

</div>

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(PGraphics.java:5011)  
at processing.core.PApplet.background(PApplet.java:9695)  
at processing.test.testdrawing.TestDrawing.draw(TestDrawing.java:73)  
at processing.core.PApplet.handleDraw(PApplet.java:1818)  
at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:471)  
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:503)

Any help is appreciated

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [September 9, 2019, 9:42am UTC](https://discourse.processing.org/t/help-with-sketch-on-processing-android/13891/2 "2019-09-09T09:42:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [September 10, 2019, 9:05am UTC](https://discourse.processing.org/t/help-with-sketch-on-processing-android/13891/3 "2019-09-10T09:05:27Z")

</div>

@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
