Could not determine java version from '12.0.1'

I am trying to launch my project on Mobile. As I have already followed the Getting started on Android from Unreal, I was sure that there couldn’t be any problems left, but now that I finally got to launch on my mobile device, I ended up with this error message:


====16.06.2019 13:12:43====PERFORMING FINAL APK PACKAGE OPERATION================================================
LogPlayLevel: Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)  
LogPlayLevel: Making .apk with Gradle...  
LogPlayLevel: FAILURE: Build failed with an exception.  
LogPlayLevel: * What went wrong:  
LogPlayLevel: Could not determine java version from '12.0.1'.  
LogPlayLevel: * Try:  
LogPlayLevel: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.  
LogPlayLevel: * Get more help at https://help.gradle.org  
LogPlayLevel: Error: ERROR: cmd.exe failed with args /c "C:\Users\kaysi\OneDrive\Dokumente\Unreal   Projects\EndlessRunner\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug  
LogPlayLevel:        (see C:\Users\kaysi\AppData\Roaming\Unreal Engine\AutomationTool  \Logs\C+Program+Files+Epic+Games+UE_4.21\Log.txt for full exception trace)  
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)  
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 10.768005  
LogPlayLevel: BUILD FAILED  
PackagingResults: Error: Launch failed! Unknown Error     

I don’t understand why it won’t accept my JDK version. Do I have to get a different one or…

I have same trouble
Windows 10
UE 4.22.3
OpenJDK 12.0.1

Hi , i also met this error (to be honest just start learn unreal) and have been disapointed in UE , but then built project and hapiness back )

This error means that current gradle version doesn’t support Java with version 12 ,
i traced logs , and found that UE4 try to use 4.6 version of gradle which really don’t support my Java version ,
in order to solve you need to change file which UE use as template (to download gradle version).
Here’s file location UE_4.23\Engine\Build\Android\Java\gradle\gradle\wrapper\gradle-wrapper.properties.
Update row where distributionUrl =… to
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-all.zip
save file and try launch again
UE will use this updates as template and in own turn dowload 5.6.2 version which support java version 11 , 12 … and new grandle will build project.