SDL broken in Android Studio 3.1?

I’ve just upgraded Android Studio from 3.0.1 to the latest (3.1) and my SDL projects are no longer building. I’m getting the error “cannot find class Objects”. Going by Lazy Foo’s tutorial that seems to be something to do with not using the right version of JDK.

I noticed that in gradle/wrapper/ the line has been updated to:


whereas it used to be (which is what Lazy Foo tells us to up it from, from the original 2.14.1 - which cures the not finding class Objects in Android Studio 3.0,1)

If I put it back to then Android Studio 3.1 tells me:

Minimum supported Gradle version is 4.4. Current version is 4.1.

I’ve been to the Oracle site and made sure I’ve got the latest “Java SE Development Kit 8u162”. I’m using all the latest SDL code too.


I’ve got things working again by changing the line in build.gradle:

classpath ‘’

down to:

classpath ‘’

When I do this Android Studio complains that I should be using the latest version and some features will be missing etc… if I don’t. I’m new to Android so I don’t know if this has any implications for SDL for the future, but at least I’m up and running again!

1 Like