6

I am trying to get libgdx gradle project to work on AIDE. AIDE is an app on android that acts like a IDE. It doesnt seems to work as the buildconfig.java does not have the package name generated. Anyone have any workaround?

thhVictor
  • 338
  • 6
  • 25
  • Same problem here, I have 2 libgdx gradle projects of which only 1 is working... I tried to find the difference in the project.properties but no luck... I've had the same kind of error as you describe but since today it cannot even resolve the badlogic package so that's probably gradle related. Anybody have suggestions on how to track this down? – Johan Stolk Jan 25 '15 at 18:27
  • I was working literally on this this morning, and will probably have another go later tonight. I've got the projects to compile but they crash instantly, and annoyingly there is no errors in the logcat in AIDE. One thing that helps is creating a new LibGDX project in AIDE, and then trying to create yours to match that. A helper is clicking on project properties and it breaks down the libs used etc, often it can't find them, and you have to edit the classpath yourself. I haven't officially solved this yet, but if I do I'll post an answer later tonight – Russ Wheeler Jan 26 '15 at 21:17

4 Answers4

0

Ok, I've got my project compiling. What I did was...

  1. Created a new LibGDX project under AIDE.
  2. Left all the folder names as they were. i.e. gdx-game, gdx-game-android.
  3. Using adb I pushed all my files into these respective folders. e.g. core = gdx-game, android = gdx-game-android
  4. I also had to copy in a .classpath from another working test LibGDX app I'd created in AIDE previously, as this time round there wasn't one.

Et Voila!

At least it's working for me.

Russ Wheeler
  • 2,590
  • 5
  • 30
  • 57
  • Can u describe how you use adb to push into aide? – thhVictor Jan 27 '15 at 04:04
  • (All this is run through a terminal) So the adb command to push files is adb push There is a good chance, depending on device that your root dir will be /sdcard. To find out, try adb shell. It will log you into your phone in the root. You may need to turn on developer options->USB debugging, if you don't already have it on. Then I just found the file location of my AIDE folder (the gdx-game ones and gdx-game-android) and pushed the files there. Or you could zip them, email to yourself and unzip them in the right folder using something like Astro – Russ Wheeler Jan 28 '15 at 15:23
  • I've just noticed that today there is an update on AIDE that now uses gradle!! I haven't tried it yet, but that might make all my work yesterday, for nothing! – Russ Wheeler Jan 28 '15 at 16:17
  • It still doesn't support the gradle libgdx generates. – thhVictor Jan 29 '15 at 00:08
  • I'm just finding this this morning. It also no longer works with the app I managed to tweak to get working using jars – Russ Wheeler Jan 29 '15 at 09:36
  • Just fixed my working app again, for me I'd lost my .project and .classpath files as they were in my .gitignore. Creating a new temp libgdx project and copying those two files into mine worked – Russ Wheeler Jan 29 '15 at 09:45
0

Seems that AIDE's got a new interative course on using libGDX

ejectamenta
  • 1,047
  • 17
  • 20
0

Here is my solution:

First copy core/src folder to android/src folder Then copy libs folder from a project to android folder

Only problem i had was libgdx.jar file of Aide was older version.I downloaded latest version of gdx and copied jar files to libs folder.

0

@thhVictor, "It doesnt seems to work as the buildconfig.java does not have the package name generated"

It's because AIDE tries to treat regular java project (which is LibGdx project named "core") as android project. You can check it youself navigating to core/ directory and see that AIDE shows option "open this Android App project" instead of "Open this Java project". After opening and clicking "run" you'll see your error

You have 2 options:

  1. gradle-based https://github.com/Deepscorn/libgdx-gradle-template/blob/master/README.md#aide

  2. eclise project files based http://deepscorn.blogspot.ru/2016/07/building-and-running-android-studio.html

Both requires to do things by hand. But I prefer gradle-based because it's modern thing and so I hope AIDE devs will make support for regular java projects which are gradle-based

Deepscorn
  • 822
  • 10
  • 22