我正在制作 javafx应用程序,我想使用gradle将其移植到android软件包(。apk)中,但出现错误。
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.10'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
}
mainClassName = 'Main.main'
version = '8u40'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
jfxmobile {
downConfig {
version = '3.7.2'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'accelerometer', 'audio-recording', 'barcode-scan', 'battery', 'ble', 'browser', 'cache', 'compass', 'connectivity', 'device', 'dialer', 'display', 'in-app-billing', 'lifecycle', 'local-notifications', 'magnetometer', 'orientation', 'pictures', 'position', 'push-notifications', 'runtime-args', 'settings', 'share', 'statusbar', 'storage', 'vibration', 'video'
}
android {
applicationPackage = 'org.javafxports.ensemble'
compileSdkVersion = 28
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonapplication.**.*',
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
这样的错误消息
Requested project: C:\Users\IVAN\Documents\NetBeansProjects\testi
Stack trace:
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.0-bin.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)