LibGDX project written in Scala, on Android, using IntelliJ

Viewed 1806

So I've been working on a LibGDX project in IntelliJ v12.1.6 using Scala after getting set up using this tutorial: http://www.gamefromscratch.com/post/2013/12/01/Using-LibGDX-with-IntelliJ-with-Gradle.aspx. However I've noticed, when testing the game on my android device, I receive the following error

12-04 17:46:22.483: ERROR/AndroidRuntime(18951): FATAL EXCEPTION: GLThread 475
    Process: com.voliant.rsoss, PID: 18951
    java.lang.NoClassDefFoundError: scala.Predef$
    at com.voliant.rsoss.Actors.Player.act(Player.scala:20)
    at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:48)
    at com.badlogic.gdx.scenes.scene2d.Stage.act(Stage.java:225)
    at com.badlogic.gdx.scenes.scene2d.Stage.act(Stage.java:189)
    at com.voliant.rsoss.Screens.GameScreen.render(GameScreen.scala:46)
    at com.badlogic.gdx.Game.render(Game.java:46)
    at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:499)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

Whenever I attempt to utilize a method that's native to Scala (such as the standard println() method).

I suspected that the android class could not find the classes utilized by Scala, so I attempted to export the android project with the Scala library. Whenever I try this however, I get an error that I have too many methods, (similar to this) which would make sense as Scala introduces well over enough methods into the project to warrant this error.

My question is how could I make the android project aware of the Scala classes and methods, so that I could use them as effectively in the android project as I have been able to in the desktop project?

Thanks!

1 Answers
Related