你如何用javafxports android和ant构建一个apk?

时间:2015-01-14 23:28:35

标签: android ant cmd javafx javafxports

我已经尝试使用生成的项目构建apk但我不断收到错误。我一直在使用ant clean debug来创建,但是我一直遇到错误,因为它无法找到build-extras.xml我已检查并且构建附加功能在路径上:

C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\dalvik-sdk\android-tools\build-extras.xml

那你怎么用javafxports android和ant构建一个apk?

如果有帮助,这是我的cmd日志:

C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\dalvik-sdk\samples\Ensemble8\android\Ensemble8Android>ant clean debug
Buildfile: C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\dalvik-sdk\samples\Ensemble8\android\Ensemble8Android\build.xml
BUILD FAILED
C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\dalvik-sdk\samples\Ensemble8\android\Ensemble8Android\build.xml:69: Cannot find    C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\android-tools\build-extras.xml imported from C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\dalviksdk\samples\Ensemble8\android\Ensemble8Android\build.xml

Total time: 0 seconds

ant.properties:

jfx.sdk.absolute.dir=C\:/Users/svond_000/Documents/dalvik-sdk-8u40-ea3
jfx.app.absolute.dist.dir=../../ensemble
isDalvik=true

2 个答案:

答案 0 :(得分:2)

你在build-extras.xml的第69行文件build.xml中可能有错误的路径 - 没有“ - ”符号

你有路径:

C:\Users\svond_000\Documents\dalvik-sdk8u40-ea3\...

并且应该:

C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\...

答案 1 :(得分:1)

正在寻找Android sdk:

C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\

但你有它位于:

C:\Users\svond_000\Documents\dalvik-sdk-8u40-ea3\dalvik-sdk\

只需在local.properties文件或ant.properties文件中进行更正即可。