[SOLVED] No ProjectAssetManager found! when using gradle

Hello and merry christmas!
So, I tried to create a font using this tutorial, which is a little outdated, but still followable. The issue is, after I finish the Font wizard, the jme3.2 sdk reports No ProjectAssetManager found! and no font is created.

My project is a jme3.3 project on the 3.2 sdk using gradle.

Making a “regular” jme3 project in the sdk allows me to add a font, and I guess I can manually transfer the files. It kind of sounds exactly like this similar issue, but that has been reported as fixed.

Could this be a side effect of using 3.3 core libraries? Or maybe of using a gradle project?

Maybe try the official wiki? May not solve the issue but you may find its better than what you are using currently.


The topic is shown on the left nav bar,


1 Like

Are you trying to do the nifty GUI part of that tutorial or just create a bitmap font though the SDK?

The former is a perilous journey. The latter should technically work but there are also better font creation tools than the one built into the SDK. Just not as convenient.

BMFont: (the one I usually use)

Hiero: (newer and nicer)

1 Like

Gotcha, but I already use the Wiki, usually when I program I’ll have more than a few reference pages open

I was following the Nifty GUI part, but am only interested in the bitmap font creation.

I think the creation tool isn’t working because its a gradle project, as I can create a standard jme3 project and the tool works fine.

I’m not even sure if I need a font to be honest, I just wanted to load in Comic Sans to mess with my partner haha.

Thanks for those links! I’ll give them a go right now.

But as for the issue at hand, do you think it could be caused by using gradle? I kind of don;t feel like waiting 20 mins for another gradle project to load up haha.

I think I’ve found that having a gradle project is the issue. Maybe when a project is loaded through gradle, the ProjectAssetManager isn’t loaded. Whatever the case, it appears that gradle projects are missing the project asset manager

Hmm, the issue might be bigger than it appears. I get the same error message when attempting to import 3d models. It looks like using a gradle project might break alot of the SDK functions

Edit: I tried a few different cases, and it does seem that the sdk wizards and import functions don’t agree with gradle. Is there a gradle dependency I’m missing?

I see, but since I personally rewrote the wiki pages dealing with nifty, and tested every piece of code in it, including custom font creation, all of which was working, I figured it might benefit you to use the official tutorial.

This was with 3.2 sdk and ant, which is what the tutorial is using. I do not know how gradle could cause this unless there is some kinda automagical problem the sdk takes care of that gradle doesn’t.

As @pspeed said, creating the fonts in the sdk using ant would work. You can even use gradle to copy the generated assets into your gradle project assets folder or just sync the ant project assets to the gradle project assets.

I do this with one of my projects, works great but is very technical and would require a deep dive into gradle for you to fully understand the ramifications of doing it that way. There are drawbacks to doing this.

As @pspeed also said, even if you do that, you will find the fonts probably are no where as good as you want them to be. I beat that font creator to death and still couldn’t get it to deliver game quality fonts.

His suggestion is to me, the best answer.

1 Like

The sdk tools do not work with gradle as far as I know. The sdk uses ant to link assets to the folders they are in when creating them. That allows you to move assets around and sdk will track the changes for you.

I would guess this is what you are hitting.

If you create an asset in the sdk using a standard ant project, you can copy them into the same folders in the gradle project and they will work.

1 Like

Sorry I wasn’t clear! I meant that I use a few different tutorials at once, and while I was working on this I had this and this open. Both tutorials led me to the same issue (it happens often, that’s why I like to reference multiples).
I also don’t know why gradle is causing problems, but I’ve confirmed that the asset manager issue is connected to gradle somehow, and the sdk’s functions all seem to rely on that asset manager. I got the solution for the fonts, I’ll be using bmfont like pspeed suggested, but this issue is now deeper than fonts. The sdk refuses to do anything with any asset of any type, reporting the same project asset manager is missing.
I mean I already figured I’ll be needing to make my own fonts eventually, but now this involves all assets (I can’t even import a model)

Ahh I got you. I didn’t know that gradle was incompatible with the sdk tools (should maybe be noted in documents somehwere?)

So, as a ‘solution’ to this, but have a ant project beside my gradle project and copy assets manually?
What are your thoughts on creating an AssetPack project and linking it to my project?

Also, I’m going to change the title for relevance

Not good. No support for it as I know of.

Sdk is not officially part of jme and as such it is moving to its own wiki soon. Its a legacy tool not supported by core but by volunteers who still want it to live on.

Wiki will be scrubbed of sdk shortly, its all setup to do so now, next stage of wiki edits by me will fix alot of things like this.

1 Like

Gotcha, so a big no on the AssetProject.
And I did not know that about the sdk! So, is that still true for the planned 3.3 sdk? And what should I use instead of the sdk?

Yep, thats all I use sdk for myself is asset management. Makes some things easier than just straight up gradle.

It depends on what you want to use.

1 Like

You said assetpack, not assetproject. Theres a difference. Assetpacks are not supported as far as I know, an asset project is what I have been talking about, which is a blend of gradle and ant.

1 Like

Yes, sorry I was confuzzled, I was referring to New -> Project -> Asset Pack which as I understand you, is not supported.
You were referring to creating a project just for assets, right? Is there a way to have two projects, one in gradle, containing all the game code, and a regular one in ant, containing all the assets, and have the project containing all the assets to be included in the gradle one?

A bit harsh description. I wasn’t aware that it is legacy. Anyway, the 3.3 is a version that I totally recommend to use. It also has Gradle jME project template.

I think they want to make it work for gradle also from what I have seen.

Dont give up on sdk yet. It has its uses and something like making it work for gradle as well would make it the killer app.

Yes, look up sync on gradle docs.

I can show you how I do it, its hackish, and as I use jpackage combined with github workflows, its more involved and designed towards that build process.

def utilDir = "$rootDir/../util-java/build/libs"
boolean utilExist = file(utilDir).isDirectory()
def gameDir = "$rootDir/../common-game/build/libs"
boolean gameExist = file(gameDir).isDirectory()
def hostDir = "$rootDir/../common-host/build/libs"
boolean hostExist = file(hostDir).isDirectory()

project.sync { 
    from utilDir
    from gameDir
    from hostDir
    //In cases where the 'from' dir does not exist, sync will delete contents of 
    //'into' so we use a fake dir in those situations.  
    //TODO: use prevent closure when fixed https://github.com/gradle/gradle/issues/4553     
    if (utilExist && gameExist && hostExist) {
        into "$rootDir/sync/network"
    } else {
        into 'nosyncdir'

All my projects for the main project live in the same parent folder so its easier to find them and they are specific to that project.

Drawbacks are numerous though. You are tying your project to external projects and thats hugely discouraged by gradle and considered improper. Best to use tools and methods that dont requires this.

If you can avoid this, do. I do it as I have about 11 projects tied to my game server I am working on so its just temporary and for convenience.

1 Like

Do the tools work now?

1 Like