使用Lime / OpenFL编译android时出错.无法获得Java版本(Windows 10)
作者:互联网
我在构建结束时得到了这个:
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.
这让我感到困惑,因为它似乎有版本……但这是我对正在发生的事情的原始理解.
这是我的.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>
解决方法:
我认为Android SDK支持还不支持Java 10(或9) – 尝试降级到Java 8.
这里有类似问题的报道:https://github.com/facebook/react-native/issues/17688
标签:android,haxe,openfl 来源: https://codeday.me/bug/20190607/1194553.html