I've got Gradle projects and 2 IDE's: NetBeans and IntelliJ. NetBeans works perfectly with this project, no errors found. But IntelliJ in the same project throws exception:
[Assets] error: com.badlogic.gdx.utils.GdxRuntimeException: File not found: ./images/enemy.atlas (Internal)
Here is Java class:
public class Assets {
public static AssetManager assetManager;
public Assets() {
assetManager = new AssetManager();
try {
assetManager.load("./images/enemy.atlas", TextureAtlas.class);
assetManager.load("./images/buttons.atlas", TextureAtlas.class);
assetManager.load("./fonts/000.fnt", BitmapFont.class);
assetManager.load("./fonts/111.fnt", BitmapFont.class);
assetManager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));
assetManager.load("./world/level1/map.tmx", TiledMap.class);
assetManager.finishLoading();
} catch (GdxRuntimeException e) { if (Variables.isDebug) System.err.println("\n[Assets] error: " + e + "\n"); }
}
}
It is simple, right? So, I've looked through *.gradle files and noticed that gradle knows where to search for my assets:
project.ext.assetsDir = new File("../android/assets");
I've remade project especially for IDEA (using gdx-setup.jar), but same problem arises. I'm confused and asking for advise!
P.S. AssetManager is a class of LibGDX 1.1.0 library.