gpt4 book ai didi

java - 配置的androidSdk无效(Deploying JavaFX to Android)

转载 作者:行者123 更新时间:2023-11-29 05:06:08 26 4
gpt4 key购买 nike

我开发了一个小型 JavaFX 应用程序,我想在我的 Android 手机上运行它。我按照教程 here , 不幸的是,在调用 gradlew androidinstall 后,出现错误。它说 Configured androidSdk is invalid。我发誓 android 目录设置为正确的路径,即 C:\Program Files\android-sdk-windows(请参见下面的目录图片)。

错误信息:

SigningConfig{name=debug, storeFile=C:\Documents and Settings\DQ\.android\debug.keystore, storePassword=android, keyAlias=AndroidDebugKey, keyPassword=android, storeType=C:\Documents and Settings\DQ\.android\debug.keystore}

FAILURE: Build failed with an exception.

* What went wrong:
Configured androidSdk is invalid: C:\Program Files\android-sdk-windows

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- option to get more log output.

BUILD FAILED

Total time: 8.672 secs

目录截图:

enter image description here

我也试过C:\Program Files\android-sdk-windows\tools,但是没用!

有什么想法吗?

build.gradle:

buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b8'
}
}

apply plugin: 'org.javafxports.jfxmobile'

mainClassName = 'main.java.Main'
version = '8u40'

repositories {
jcenter()
}

jfxmobile {
android {
applicationPackage = 'org.javafxports.jfxmobile'
}
}

最佳答案

在 sdk 文件夹中没有 build-tools 文件夹。您应该运行 tools/android 并安装 Android SDK Build-tools

enter image description here

关于java - 配置的androidSdk无效(Deploying JavaFX to Android),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30317732/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com