How to set up libdgx with IntelliJ?

╄→尐↘猪︶ㄣ 提交于 2019-12-08 17:32:09

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/22662095/how-to-set-up-libdgx-with-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!