How to set up libdgx with IntelliJ?

I followed this tutorial but it seems that it is kind out of date? I'm not sure.
Unfortunately I'm not very experienced with Java (but with C#, Python, ..) so maybe there is something obvious I did not regard.

IntelliJ is giving me import errors for libraries from the com.badlogic.gdx package

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

java: package com.badlogic.gdx does not exist etc..

Actually I would say there are some missing dependencies but this gdx-setup.jar should solve this problems already?


I had the same problem and just found the answer that worked for me.

Open your android skd manager from the tools directory of where ever you put the android sdks

make sure that Android SDK build-tools 19.03 is installed

if not install it

then go to intelliJ and from the menu bar open View->Tool Windows->gradle

then hit the refresh (two green arrow)

Worked for me anyway.

链接地址: http://www.djcxy.com/p/78398.html

上一篇: 如何使用pdf.js来渲染PDF文件?

下一篇: 如何用IntelliJ设置libdgx?