brandmooffin / cocos2d-mono

Continuation of Cocos2D-XNA project, with focus on MonoGame
http://cocos2d-mono.dev
MIT License
29 stars 2 forks source link

BMFont file in Android can not be loaded #253

Closed MartinLutherSu closed 1 year ago

MartinLutherSu commented 1 year ago

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.<>cDisplayClass62_0.b0(Object s) at Android.App.SyncContext.<>cDisplayClass3_0.b0() 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?

brandmooffin commented 1 year ago

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.

brandmooffin commented 1 year ago

This issue will be resolved as part of update 2.4.5

brandmooffin commented 1 year ago

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