简体   繁体   中英

Error compiling android with Lime/OpenFL. Unable to get Java version (Windows 10)

I get this at the end of my build:

Unzipping C:\Users\jdoughty\.gradle\wrapper\dists\gradle-2.10-bin\2v0chm5oshw52qn5d7jjz7lo0\gradle-2.10-bin.zip to C:\Users\jdoughty\.gradle\wrapper\dists\gradle-2.10-bin\2v0chm5oshw52qn5d7jjz7lo0

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.
Build halted with errors.

This confuses me slightly because it seems like it has the version... but that's my primitive understanding of what's going on.

This is the contents of my .lime/config.xml :

<?xml version="1.0" encoding="utf-8"?>
<config>

    <section id="defines">


    </section>
    <define name="ANDROID_NDK_ROOT" value="C:\android-ndk-r15c-windows-x86_64\android-ndk-r15c" />
    <define name="ANDROID_SDK" value="C:\Users\jdoughty\AppData\Local\Android\Sdk" />
    <define name="JAVA_HOME" value='"C:\Program Files\Java\jdk-10.0.1"' />
    <define name="ANDROID_SETUP" value="true" />

</config>

I think the Android SDK support doesn't support Java 10 (or 9) just yet - try downgrading to Java 8.

There's reports of a similar issue here: https://github.com/facebook/react-native/issues/17688

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM