简体   繁体   English

JavaFXPorts 和 NetBeans Gluon 插件

[英]JavaFXPorts and NetBeans Gluon Plugin

I'm getting following exception while building Javafx Application into Android.我在将 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

and I'm had installed android sdk and pointed to ANDROID_HOME .我已经安装了 android sdk 并指向ANDROID_HOME this my build script in build.gradle .这是我在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')
    }
}

I'm trying to install very simple javafx application into my android device.我正在尝试将非常简单的 javafx 应用程序安装到我的 android 设备中。 please help me with advance.请帮我提前。

First of all, check that your Gluon plugin for NetBeans is updated.首先,检查您的 NetBeans Gluon 插件是否已更新。 Currently you can use version 1.0.2, that will provide you with a more updated version of the plugin:目前您可以使用 1.0.2 版本,它将为您提供更新版本的插件:

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

Actually, according to this , you can update that manually to:实际上,根据this ,您可以手动将其更新为:

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

Now check on Android SDK, using SDK Manager, that you have installed sdks version 22, and building tools version 22, but not version 23, which is for the new Android M, not supported yet by JavaFXPorts.现在使用 SDK 管理器检查 Android SDK,您是否已安装 sdks 版本 22,以及构建工具版本 22,但未安装版本 23,后者适用于新的 Android M,JavaFXPorts 尚不支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM