1
\$\begingroup\$

I've created a LibGDX project. I imported the build.gradle. The core and desktop modules are imported successfully, but the android not. So I add the content roots. The project compiles, I could build an apk as well via gradle build, but the libgdx android libraries are not imported by the IDE, so classes like com.badlogic.gdx.backends.android.AndroidApplication are unresolved. This wasn't a problem so far, because it compiles, but now I'd like to develop Android specific code, so the code completion would be great. Any ideas how I could add the relevant dependencies from the build.gradle?

\$\endgroup\$
1
\$\begingroup\$

As workaround, I personnaly use Android Studio which is based on Intellij Idea when developping LibGdx app for Android. Just import build.gradle in Android Studio, and you should be ready to edit your core, desktop and Android libGDX project without any further configuration.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Like Khopa has stated, use Android Studio. I still a beginner bit of a beginner to libgdx, but so for I have found that Android Studio covers all of my needs. You can even run the desktop version from A.S. and on the plus side, you can easily emulate an android device using the built in intel HAXM, only works with intel cpu's. For AMD use genymotion, which A.S. integrates into the IDE.

All you have to do is build the LibGdx project then load build.gradle from A.S. Make sure to build the game within core. Hopes this helps, have fun!

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.