![](/img/trans.png)
[英]jfxmobile plugin doesn't add android.jar and javafxports jar
[英]what is the diference over org.javafxports » jfxmobile-plugin 1.3.16 and 2.0.30
與org.javafxports jfxmobile-plugin 1.3.16和2.0.30的區別是什么?我嘗試將1.3.16版本更新為2.0.30,但未編譯項目
jfxmobile-plugin是一個gradle插件,用於統一針對不同目標平台的Java和JavaFX應用程序的構建:
JFXMobile插件有兩種形式:
jfxmobile 1.3.16
請參閱Maven Central及其存儲庫 。
樣本:請參閱Gluon Mobile 樣本
典型的構建:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.16'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
compile 'com.gluonhq:charm:5.0.0'
}
jfxmobile 2.0.30
請參閱Maven Central及其存儲庫 。
Gluon VM的樣本 :請參閱帶有Gluon VM 樣本的 Gluon Mobile。
典型的構建:
buildscript {
repositories {
google()
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.30'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.gluonhq:charm:5.0.0-jdk9'
androidRuntime 'com.gluonhq:charm:5.0.0'
}
差異性
如您在插件2.x的自述文件中所看到的:
javafxmobile-plugin版本1.x將Java 8帶入了移動開發。 版本2.x是該插件的升級,可以通過利用Gluon VM來進行Java 9開發。
和:
Gluon VM仍在積極開發中,目前僅在iOS設備上受支持。
目前,它正在開發人員預覽中。
摘要
如果您要開發用於生產的應用程序,請使用穩定的1.x版本以及Java 8(適用於Android和iOS),其中大多數Java 7 SE API都可用,並且還支持一些Java 8 API(像lambdas)。 雖然不支持流。
如果要嘗試Java 9功能,請使用新的2.x版本。 它支持Streams和Java9。請注意,在Android上,不支持Java 9 API,它必須與Java 8兼容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.