0

I am trying to create a client-server application. I use Libgdx framework and develop the app by using Android Studio.

My problems are:

1) How can I debug client and server in Android studio? I do not mind using android devices as clients and my desktop as server

2) I plan to make a desktop application as server and the mobile devices as clients (in LibGDX you can create apps that can run on desktop and mobile devices at the same time). I try the source code in

https://github.com/pepedeab/libGDX-Net/tree/master/servidor/libs

However, it does not seem to work in my case, any suggestions?

Thank you

dhayyati
  • 49
  • 9
  • The repository that you posted uses an old version of LibGDX, I'd switch to something newer and actually published to Maven Central. If you want a cross-platform web sockets client library, you can try [gdx-websocket](https://github.com/czyzby/gdx-lml/tree/master/websocket). Disclaimer: I'm the author. – Czyzby May 01 '16 at 11:20
  • Hi, Thank you for your advice. However I cannot run the examples given (gml/examples/websocket-tests) as it says something with the assets. any idea? – dhayyati May 03 '16 at 02:29
  • Never mind. It runs well, just had one issue, which is Gradle sync failed. Gradle sync failed: Can't register given path of type 'RESOURCE' because it's out of content root. Content root: '/Users/dhayyati/Downloads/gdx-lml/examples/gdx-websocket-tests/desktop' Given path: '/Users/dhayyati/Downloads/gdx-lml/examples/gdx-websocket-tests/core/asset – dhayyati May 03 '16 at 04:11
  • That's common issue when importing to IntelliJ as Gradle project, try running `gradle idea` and importing it as regular project - everything should be fine. This is because desktop project tries to add `assets` folder as source, and IntelliJ complains because it isn't in `desktop` folder. Without `assets` properly linked, `desktop` is unable to run via IDE. If all you want is to test stuff, you can just use `gradle server:run` and `gradle desktop:run`. – Czyzby May 03 '16 at 07:55
  • Hi, Thank you, I used Android studio as IDE. It runs well, except that gradle sync issue :) Thanks – dhayyati May 04 '16 at 01:52

0 Answers0