JavaFXPorts 和 NetBeans Gluon 插件

标签 java android netbeans javafx javafxports

我在将 Javafx 应用程序构建到 Android 中时遇到以下异常。

error: Error: No resource found that matches the given name (at 'icon' with value '@mipmap/ic_launcher').

:processAndroidDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processAndroidDebugResources'.
> Process 'command 'E:\Android\android-sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1

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

BUILD FAILED

Total time: 1 mins 24.005 secs



Build failure (see the Notifications window for stacktrace): gradle :android

我已经安装了 android sdk 并指向 ANDROID_HOME。这是我在 build.gradle 中的构建脚本。

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b4'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
}

mainClassName = 'com.javafxport.JavaFXPort'

jfxmobile {
    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
    }
}

我正在尝试将非常简单的 javafx 应用程序安装到我的 Android 设备中。请提前帮助我。

最佳答案

首先,检查 NetBeans 的 Gluon 插件是否已更新。目前您可以使用版本 1.0.2,它将为您提供更新版本的插件:

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

其实,根据this ,您可以手动更新为:

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

现在,使用 SDK Manager 检查 Android SDK,您是否已安装 sdks 版本 22 和构建工具版本 22,但未安装版本 23,该版本适用于新的 Android M,JavaFXPorts 尚不支持。

关于JavaFXPorts 和 NetBeans Gluon 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32448239/

相关文章:

java - 缓存和持久化数据

java - Apache Flink 数据集 API : How to merge a Flink DataSet with itself to a new one?

java - 在当前项目和存储库中可用的插件组 [] 中未找到前缀 'war' 的插件

android - Web API 总是返回成功

java - 处理 recyclerview 单击 fragment 而不是 holder 类

java - Android Studio(增加最终变量)

java - 如何使用jface在列表中搜索所需元素

android - 如何为应用程序禁用 Doze?

java - 自定义 Ant 构建和 JavaFX

java - WSO2 ESB 的用途是什么?