[Solved] Getting started, jme3.0, Android 4.2.2 and Augmented Reality for Android Application development

Hi all,

I am working though the book “Augmented Reality for Android Application Development”

It is based around Android Studio, and includes various JME3.0 libs.

I am specifically stuck on the very first project that uses JME3, which can be found in

I successfully ran the first project which had no JME intergration.

The program fails at runtime with the stack trace pasted at the end of this post.

I am attempting to run on a samsung SM-T310 on Android Version 4.4.2

Some scratching around on various forums would imply that JME3.0 had issues with later versions of Android, leading to NullPointerException in BitmapFontLoader and that later version were “fixed”

I have tried the latest 3.0 libs archived here but they fail in the same manner. So I am not convinced that is the issue.

I did try to move forward to 3.1, but it is apparent that there are changes in implementation ( specifically around AndroidConfigChooser ) that I am no where near ready to absorb and address ( I am no Android / Java wizard )

I suspect that I am a victim of my own naivety, I sincerely hope I can get 3.0 to work, so I don’t have to refactor the world to 3.1, but I am far too inexperienced to recognise my mistake.

So can the forum please help point me to what is likely going on? I am more that happy to do heavy lifting to get more details and any forensics that those with the knowledge need.

Yours in hope…

04-17 22:36:48.966 5877-5892/com.ar4android.cameraAccessJME E/com.jme3.app.AndroidHarness: SEVERE Exception thrown in Thread[GLThread 1829,5,main]
java.lang.NullPointerException
at com.jme3.font.plugins.BitmapFontLoader.load(BitmapFontLoader.java:63)
at com.jme3.font.plugins.BitmapFontLoader.load(BitmapFontLoader.java:171)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.asset.DesktopAssetManager.loadFont(DesktopAssetManager.java:370)
at com.jme3.app.SimpleApplication.loadGuiFont(SimpleApplication.java:179)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:187)
at com.jme3.app.AndroidHarness.initialize(AndroidHarness.java:455)
at com.jme3.system.android.OGLESContext.initInThread(OGLESContext.java:207)
at com.jme3.system.android.OGLESContext.onSurfaceCreated(OGLESContext.java:183)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1509)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1248)

I see this thread from 2013 which looks related, but does not lead to a conclusion…

Ha solved my own problem.

I believed I had imported the libs from 3.0.10 into the relevant libs folder in the project, however, during the project import into the Android IDE it had rehosted all files in new subdirectories.

Therefore the first time I attempted to replace the libs that come with the books projects, nothing actually changed.

Replacing the libs in the new project location built / ran fine.

So the issue was likely prevalent when the book was published, but addressed since.

On to the next challenge.

At least writing this forced me to question if I really had replaced the libs correctly in the first place with the latest!

Since you’ve typed it this way twice, I thought I would check. But if the book is actually titled that and not “Augmented Reality For Android Application Development” then you should return it and get your money back.

1 Like

Yep, I couldn’t cut and paste the title from the digital reader, and my brain took over from there! Fixed.

1 Like