Processing in android studio with androidx support

The latest version of android studio use new androidx support library as default.
You could still refactor to AppCompat but it is not recommended and one day it will be completely deprecated.
The android version of processing still use AppCompat, but even you enable legacy support, it still won’t work in androidx environment.
Here’s the solution.

I migrated the latest version “Aug 5, 2019 commit 19c6d03” to androidx.
(ONLY core library)

For your convenience,

Let me know if you find any bug.


I am getting the error below. It seems I cannot yet use P3D mode because the app works when I just use regular java 2d renderer.

java.lang.NullPointerException: Attempt to invoke virtual method ‘’ on a null object reference

at processing.opengl.PGL.loadVertexShader(
at processing.opengl.PGraphics2DX.getShader(
at processing.opengl.PGraphics2DX.flushBuffer(
at processing.opengl.PGraphics2DX.textureImpl(
at processing.opengl.PGraphics2DX.textCharModelImpl(
at processing.opengl.PGraphicsOpenGL.textCharImpl(
at processing.core.PGraphics.textLineImpl(
at processing.opengl.PGraphicsOpenGL.textLineImpl(
at processing.core.PGraphics.textLineAlignImpl(
at processing.opengl.PGraphicsOpenGL.text(
at processing.core.PApplet.text(
at xds.rq2.integrationtest1.Visualizations.SketchMaster.drawWarnings(
at xds.rq2.integrationtest1.Visualizations.SketchMaster.draw(
at processing.core.PApplet.handleDraw(
at processing.opengl.PSurfaceGLES$RendererGLES.onDrawFrame(
at android.opengl.GLSurfaceView$GLThread.guardedRun(
at android.opengl.GLSurfaceView$

It might be I forgot include the shader folder. Open the jar as zip file, and put this folder inside.

If the problem still existed, I will suggest you to try using the official build in android studio, you need to refactor to AppCompat or use older version of android studio.

Thanks! I think it works for me now with P3D mode. Doing further testing.
I placed the updated jar file here:

Good to hear! Hahhhhh.