TL;DR: why does not launching the desktop project work in my sample project GitHub - noncom/jme_android_example_as3_canary6 in Android Studio 3 Canary 6?
Currently I am working on Android projects with JME and there was time when I successfully setup a project for development under Android Studio 2 (feel free to use this example as a starting point for your AS2 project): GitHub - noncom/jme-android-example
However, time goes along and Android Studio 3 is arriving. So I have created the same kind of a base project in Android Studio 3 Canary 6: GitHub - noncom/jme_android_example_as3_canary6
All is fine except that the desktop project does not work anymore. I don’t get any errors in the studio itself, but trying to run the DesktopLauncher
class fails with a SimpleApplication: NoClassDefFoundError
message that indicates that it cannot see the JME libraries from there. Try it out and see.
I did not manage to find any cure for this problem. If I remove other projects (app and core) from the settings.gradle
file, and move the Game
class to desktop, then these projects disappear and the error goes away. That makes it look like if the IDE can only actually process dependencies for a single project.
NOTE: This is not a JME problem in itself. The same thing happens with any other library used in the same pattern. I have successfully reproduced the same behavior for Googles “Gson” library. However, I am bringing this here up since it is not completely unrelated either. And, besides, when it is fixed, the template can be used by people to easily setup their projects within Android Studio 3 with all its new features (like Kotlin). Or maybe I am missing something obvious (although I’ve already spent hours looking for info on Gradle and experimenting).
THIS ? ON G+: https://plus.google.com/109276295736585566471/posts/gqojQpFfHJT
THIS ? IN GOOGLE ISSUE TRACKER: https://issuetracker.google.com/issues/63629970