MOE could not determine Java version [libGDX]

I was trying to run my libGDX game on Android Studio via the ios-moe run configuration except when I tried running it, the build failed and returned

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '10.0.1'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Multi-OS Engine module build failed

I went into terminal and ran

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home 

and in Project Structure > SDK Location, I changed the JDK location to the same path.

However, I still got the same message in the build. What is going on and how do I fix this?