What is the best way to develop with JME for Android?

So, I want to develop a JME 3.1 based game for Android, but having some of the tools would be nice too. Can I develop in Netbeans and port to Android Studio? Or, is there a better way?

1 Like

Best way is to use the JME SDK.

If you’d like a basic application to work in the JME SDK Simply:

  1. New Project → Basic Game
  2. Download the Android SDK
  3. Tools → Plugins → Download Android Plugins
  4. Libraries → Add Library → JME Android Libraries
  5. Properties → Compile → Uncheck “Compile on Save”
  6. Properties → Android → Select SDK Folder
  7. Properties → Android → Select Target
  8. Clean and Build

This project will now run on Android and compile an APK on build.

4 Likes

Thanks!

I use Android Studio myself. I don’t know if the jME SDK works with Android’s USB debugging or not, but it’s nice to be able to read console output in LogCat.

For Android Studio you just have to put a copy of the jME libraries in your app’s libs folder, or modify the Gradle script so it looks for jME on jCenter.

1 Like

LogCat works just fine in SDK

2 Likes

I might try out the SDK then. Android Studio is really slow when compiling for some reason. Takes 5 minutes to build. I have Gradle set to offline mode and parallel execution, but it’s still super slow. Doesn’t seem to work with Groovy either. When I have groovy in my libs folder it just sits there compiling forever, never spits out an error. Even let it compile for over three hours once just to see if it would ever finish, it didn’t. So I just don’t use Groovy.

1 Like

Regarding groovy: try going to command line and exectuing a gradle build with --debug flag. I have resolved quite some gradle problems in Android studio that way. Graphically it just shows build running to infinity but in reallity gradle build fails.

1 Like

You don’t need to add the android library to the main project.

1 Like

It does

The Android plugin won’t install:

“The plugin Common Test Runner API is requested in version >= 1.19.1 (release version 1) but only 2.8.1 (of release version different from 1) was found.”

Can I still use ADB without it?

2 Likes

Yes. I had the same problem but ignored it. Device system log spams my pc just fine.

1 Like

In case it helps: debugging on android with jme 3.1: Debugging jme on android from the sdk

2 Likes

One may look into this as well. It is based on the Android Studio v3 with JME v3.2
https://github.com/leader94/JmeWithAndroid

take a look at those