brandmooffin/cocos2d-mono

BMFont file in Android can not be loaded

Closed this issue · 3 comments

I just run the example project deploy into my Android Device which runing Android 9.0(API 28), but the fnt file can not be loaded, it tells me that:

Microsoft.Xna.Framework.Content.ContentLoadException
Message=Failed to load the asset file from fonts/bitmapFontTest2.fnt
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.MonoGameAndroidGameView.UpdateAndRenderFrame()
at Microsoft.Xna.Framework.MonoGameAndroidGameView.processStateRunning(CancellationToken token)
at Microsoft.Xna.Framework.MonoGameAndroidGameView.RunIteration(CancellationToken token)
at Microsoft.Xna.Framework.MonoGameAndroidGameView.<>c__DisplayClass62_0.b__0(Object s)
at Android.App.SyncContext.<>c__DisplayClass3_0.b__0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 52
at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 36
at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net6.0/android-31/mcw/Java.Lang.IRunnable.cs:line 84
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22

I research this problem and found it seems it can be run correctly in Android Emulator but I am not sure of that, but in the real Android device, it can not be loaded.

Any idea to solve this problem?

Hi @MartinLutherSu sorry about the delayed response. I am currently investigating this issue now and I will let you know what I am able to figure out.

This issue will be resolved as part of update 2.4.5

This should be resolved now. The issue was that the test was referencing an old asset that was no longer applicable.