空箱,库,创建Android项目使用JavaFX And​​roid的工具后的src文件夹 [英] Empty bin,libs,src folders after creating Android project using Javafx android-tools

查看:181
本文介绍了空箱,库,创建Android项目使用JavaFX And​​roid的工具后的src文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用JavaFX的Andr​​oid工具创建一个Android项目后,文件夹仓,库,和src是空的!我跟着这个教程:<一href="https://bitbucket.org/javafxports/android/wiki/Building%20and%20deploying%20JavaFX%20Applications"相对=nofollow>安卓/构建和部署JavaFX应用程序。

After creating an Android project using Javafx android-tools, the folders bin, libs, and src were empty! I followed this tutorial: android / Building and deploying JavaFX Applications.

难道我错过了什么?请帮帮忙!

Have I missed something? Please help!

推荐答案

我觉得该教程是相当古老的...现在你可以使用的最后一个插件,他们realeased。

I think that tutorial is quite old... Now you can just use the last plugin they have realeased.

转到入门网站,并检查你拥有了一切的地方。基本上,你将需要:

Go to Getting Started site, and check you have everything in place. Basically, you will need:

  • JDK8u40早日进入释放安装JAVA_HOME应与JDK路径进行设置。
  • 摇篮 2.2.1安装
  • 在Android的 SDK
  • 在Android编译工具21.1.1使用SDK管理器。
  • 在摇篮插件的NetBeans或IDE(可选)
  • 而这是一个'build.gradle'文件的插件。
  • JDK8u40 early access release installed, JAVA_HOME should be set with the JDK path.
  • Gradle 2.2.1 installed
  • Android SDK
  • Android Build Tools 21.1.1 using SDK Manager.
  • Gradle Plugin for NetBeans or your IDE (optional)
  • And the plugin which is a 'build.gradle' file.

build.gradle

buildscript {
    repositories {
        jcenter()
        }

    dependencies {
        classpath 'org.javafxports:javafxmobile-plugin:1.0.0-rc3'
    }
}

apply plugin: 'javafxmobile'

mainClassName='org.javafxports.android.MainJavaFX'

repositories {
    jcenter()
}

jfxmobile {
    android {
        applicationPackage = 'org.javafxports.android'
        androidSdk = file ('<your path to android sdk>')
    }
}

您可以尝试合奏8的项目,你可以从这里下载或克隆项目,看看自己是端口多么容易这个应用程序到Android。

You can try the Ensemble 8 project that you can download from here or clone the project, and see for yourself how easy it is to port this application to Android.

您可以创建APK那么容易,因为在输入命令行:

You can create the apk as easy as typing on command line:

gradlew android

或此创建的apk和Android设备上安装它,如果你有它连接的:

or this to create the apk and install it on your android device if you have it connected:

gradlew androidInstall

一旦你已经测试了它,你将要创建自己的项目。所以,现在你可以创建新的项目的摇篮插件。假设你使用NetBeans,你可以先创建一个根项目,然后添加一个空的子项目。在此子项目,您可以添加所有的JavaFX源,你应该重写上面所示的默认gradle.build文件,调整的路径,你的包。

Once you have tested it, you will want to create your own project. So now you can create new projects with the Gradle plugin. Assuming you use NetBeans, you can create first a root project, and then add an empty subproject. On this subproject you can add all your JavaFX sources and you should override the default gradle.build file with the one shown above, adapting the path to your packages.

您需要在合奏项目的gradlew文件和文件夹,或者如果你有摇篮的路径上,那么你可以用相同的命令建造的APK,但使用摇篮的android

You will need the gradlew files and folder from the ensemble project, or if you have gradle on your path, then you can build the apk with the same commands, but using gradle android.

重要事项

该插件与上次JDK8 8u40,但它不支持所有Java 8功能(数据流和可选),同时支持lambda表达式。相反,它支持所有主要的JavaFX的八大特点。

The plugin works with the last JDK8 8u40, but it doesn't support all Java 8 features (Streams and Optional), while it supports Lambdas. On the contrary, it supports mainly all the JavaFX 8 features.

这是在工作的进展,所以有些问题可能​​没有解决,你可以的报告任何问题,你可能有。

It's in working progress, so some issues may not been solved yet, and you can report any problem you may have.

这篇关于空箱,库,创建Android项目使用JavaFX And​​roid的工具后的src文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆