Skip to main content
Spelling, grammar; deleted 7 characters in body
Source Link
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

For web support (support cross platforms) you need to use libraries that do not use Java features such as reflection (Gson problem). If possible use libraries implemented in libgdx. In your cesecase, use [https://github.com/libgdx/libgdx/wiki/Reading-and-writing-JSON][1]Reading and Writing JSON.

There is always some peacepiece of platform specific-specific code. For this, write javaa Java interface class and implement it for every specific platform (also test it ;)). Pass this object throwthrough your game constructor in your core game. For more see: [https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code][2]

[1]: http://(https://github.com/libgdx/libgdx/wiki/Reading-and-writing-JSON [2]:For more, see https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific with Platform-codeSpecific Code.

For web support (support cross platforms) you need to use libraries that do not use Java features such as reflection (Gson problem). If possible use libraries implemented in libgdx. In your cese use [https://github.com/libgdx/libgdx/wiki/Reading-and-writing-JSON][1].

There is always some peace of platform specific code. For this write java interface class and implement it for every specific platform (also test it ;)). Pass this object throw game constructor in your core game. For more see: [https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code][2]

[1]: http://(https://github.com/libgdx/libgdx/wiki/Reading-and-writing-JSON [2]: https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code

For web support (support cross platforms) you need to use libraries that do not use Java features such as reflection (Gson problem). If possible use libraries implemented in libgdx. In your case, use Reading and Writing JSON.

There is always some piece of platform-specific code. For this, write a Java interface class and implement it for every specific platform (also test it ;)). Pass this object through your game constructor in your core game.

For more, see Interfacing with Platform-Specific Code.

Source Link
MatejC
  • 204
  • 1
  • 3

For web support (support cross platforms) you need to use libraries that do not use Java features such as reflection (Gson problem). If possible use libraries implemented in libgdx. In your cese use [https://github.com/libgdx/libgdx/wiki/Reading-and-writing-JSON][1].

There is always some peace of platform specific code. For this write java interface class and implement it for every specific platform (also test it ;)). Pass this object throw game constructor in your core game. For more see: [https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code][2]

[1]: http://(https://github.com/libgdx/libgdx/wiki/Reading-and-writing-JSON [2]: https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code