如何用javafxports和android和ant构建apk?

0lvr5msh  于 2021-06-30  发布在  Java
关注(0)|答案(2)|浏览(350)

我曾试图用生成的项目来构建apk,但我不断地得到错误。我一直在使用ant clean debug来创建,但我不断遇到错误,因为它无法找到我检查过的build-extras.xml,而build-extras位于以下路径:

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

那么如何用javafxports和android和ant构建apk呢?
这是我的命令日志,如果有帮助的话:

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

蚂蚁属性:

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

thigvfpy1#

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

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

应该有:

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

z9ju0rcb2#

它正在寻找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 文件。

相关问题