我正在尝试将Maven项目迁移到gradle。到目前为止,我已经成功完成了“运行任务”(该应用程序可以在Eclipse中正常运行),但是我无法生成apk文件。
build.gradle文件:
'`
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.12'
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'org.javafxports.jfxmobile'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'io.rainrobot.wake'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
mainClassName = 'io.rainrobot.wake.android.GluonApplication'
repositories {
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
mavenCentral()
}
dependencies {
compile 'com.gluonhq:charm:5.0.0'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.1.3'
compile ('org.apache.httpcomponents:httpasyncclient:4.1.3') {
exclude group: 'commons-logging', module: 'commons-logging'
}
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.1.3'
compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.0.Final'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.5'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.5'
compile group: 'org.springframework', name: 'spring-web', version: '5.0.6.RELEASE'
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-webflux')
compile('org.springframework.boot:spring-boot-starter-jta-narayana:1.5.9.RELEASE')
runtime('org.springframework.boot:spring-boot-devtools')
testCompile('org.springframework.boot:spring-boot-starter-test')
compile('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-websocket'
}
}
jfxmobile {
downConfig {
version = '3.8.0'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
androidSdk='C:/Users/Roy 1/android-sdks'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
`'
领事输出:
Working Directory: C:\Users\Roy 1\eclipse\workspaces\wake\app
Gradle User Home: C:\Users\Roy 1\.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 4.8.1
Java Home: C:\Program Files\Java\jdk1.8.0_131
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: android
> Task :validateManifest
> Task :collectMultiDexComponents
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileAndroidJava NO-SOURCE
> Task :processAndroidResources NO-SOURCE
> Task :androidClasses UP-TO-DATE
> Task :copyClassesForRetrolambda
> Task :applyRetrolambda
Retrolambda 2.5.3
00:00 INFO: Bytecode version: 50 (Java 6)
00:00 INFO: Default methods: true
00:00 INFO: Input directory: C:\Users\Roy 1\eclipse\workspaces\wake\app\build\javafxports\tmp\android\retrolambda\input
00:00 INFO: Output directory: C:\Users\Roy 1\eclipse\workspaces\wake\app\build\javafxports\tmp\android\retrolambda\output
00:00 INFO: Classpath: [C:\Users\Roy 1\eclipse\workspaces\wake\app\build\javafxports\tmp\android\retrolambda\input, C:\Users\Roy 1\android-sdks\platforms\android-27\android.jar]
00:00 INFO: Included files: all
00:00 INFO: JVM version: 1.8.0_131
00:00 INFO: Agent enabled: false
00:12 INFO: Saving lambda class: org/springframework/web/reactive/function/server/RequestPredicate$$Lambda$1
00:12 INFO: Saving lambda class: reactor/ipc/netty/http/server/HttpServerRoutes$$Lambda$1
00:12 INFO: Saving lambda class: reactor/ipc/netty/http/server/HttpServerRoutes$$Lambda$2
00:12 INFO: Saving lambda class: reactor/ipc/netty/http/server/HttpServerRoutes$$Lambda$3
00:12 INFO: Saving lambda class: org/springframework/boot/devtools/restart/classloader/ClassLoaderFileRepository$$Lambda$1
00:12 INFO: Saving lambda class: org/springframework/boot/devtools/restart/FailureHandler$$Lambda$1
00:12 INFO: Saving lambda class: reactor/core/Scannable$$Lambda$1
00:12 INFO: Saving lambda class: reactor/core/Scannable$$Lambda$2
00:12 INFO: Saving lambda class: reactor/core/Scannable$$Lambda$3
00:14 INFO: Saving lambda class: org/springframework/security/authorization/ReactiveAuthorizationManager$$Lambda$1
00:14 INFO: Saving lambda class: org/springframework/security/authorization/ReactiveAuthorizationManager$$Lambda$2
00:14 INFO: Saving lambda class: org/springframework/security/authorization/ReactiveAuthorizationManager$$Lambda$3
00:14 INFO: Saving lambda class: org/springframework/boot/context/properties/source/IterableConfigurationPropertySource$$Lambda$1
00:14 INFO: Saving lambda class: reactor/util/context/Context$$Lambda$1
00:14 INFO: Saving lambda class: reactor/util/context/Context$$Lambda$2
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyContext$$Lambda$1
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$1
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$2
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$3
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$4
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$5
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$6
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$7
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$8
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$9
00:14 INFO: Saving lambda class: reactor/ipc/netty/NettyOutbound$$Lambda$10
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/server/HandlerFilterFunction$$Lambda$1
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/server/HandlerFilterFunction$$Lambda$2
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/server/HandlerFilterFunction$$Lambda$3
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/server/HandlerFilterFunction$$Lambda$4
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/server/HandlerFilterFunction$$Lambda$5
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/server/HandlerFilterFunction$$Lambda$6
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFilterFunction$$Lambda$1
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFilterFunction$$Lambda$2
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFilterFunction$$Lambda$3
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFilterFunction$$Lambda$4
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFilterFunction$$Lambda$5
00:16 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFilterFunction$$Lambda$6
00:16 INFO: Saving lambda class: org/springframework/boot/devtools/remote/server/AccessManager$$Lambda$1
00:16 INFO: Saving lambda class: reactor/ipc/netty/resources/PoolResources$$Lambda$1
00:16 INFO: Saving lambda class: reactor/ipc/netty/resources/PoolResources$$Lambda$2
00:17 INFO: Saving lambda class: org/springframework/boot/context/properties/source/ConfigurationPropertyName$CharProcessor$$Lambda$1
00:17 INFO: Saving lambda class: org/springframework/boot/context/properties/source/ConfigurationPropertyName$CharProcessor$$Lambda$2
00:17 INFO: Saving lambda class: reactor/ipc/netty/http/websocket/WebsocketOutbound$$Lambda$1
00:17 INFO: Saving lambda class: reactor/ipc/netty/http/websocket/WebsocketOutbound$$Lambda$2
00:17 INFO: Saving lambda class: org/springframework/boot/devtools/restart/RestartInitializer$$Lambda$1
00:17 INFO: Saving lambda class: org/springframework/util/concurrent/ListenableFuture$$Lambda$1
00:17 INFO: Saving lambda class: org/springframework/util/concurrent/ListenableFuture$$Lambda$2
00:18 INFO: Saving lambda class: org/springframework/boot/context/properties/bind/PlaceholdersResolver$$Lambda$1
00:18 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Filter$$Lambda$1
00:18 INFO: Saving lambda class: com/gluonhq/charm/glisten/layout/Layer$$Lambda$1
00:18 INFO: Saving lambda class: com/gluonhq/charm/glisten/layout/Layer$$Lambda$2
00:19 INFO: Saving lambda class: org/springframework/boot/devtools/settings/DevToolsSettings$$Lambda$1
00:22 INFO: Saving lambda class: org/springframework/core/MethodParameter$$Lambda$1
00:23 INFO: Saving lambda class: com/gluonhq/cloudlink/client/data/RemoteFunction$$Lambda$1
00:23 INFO: Saving lambda class: com/gluonhq/cloudlink/client/data/RemoteFunction$$Lambda$2
00:23 INFO: Saving lambda class: reactor/util/concurrent/WaitStrategy$$Lambda$1
00:23 INFO: Saving lambda class: org/springframework/jmx/export/MBeanExporter$$Lambda$1
00:23 INFO: Saving lambda class: org/springframework/jmx/export/MBeanExporter$$Lambda$2
00:23 INFO: Saving lambda class: org/springframework/jmx/export/MBeanExporter$$Lambda$3
00:23 INFO: Saving lambda class: org/springframework/jmx/export/MBeanExporter$$Lambda$4
00:23 INFO: Saving lambda class: org/springframework/jmx/export/MBeanExporter$$Lambda$5
00:23 INFO: Saving lambda class: reactor/core/scheduler/PeriodicSchedulerTask$$Lambda$1
00:23 INFO: Saving lambda class: org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzer$$Lambda$1
00:23 INFO: Saving lambda class: org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzer$$Lambda$2
00:23 INFO: Saving lambda class: org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzer$$Lambda$3
00:23 INFO: Saving lambda class: org/springframework/web/servlet/mvc/method/annotation/DeferredResultMethodReturnValueHandler$$Lambda$1
00:23 INFO: Saving lambda class: reactor/ipc/netty/channel/FluxReceive$$Lambda$1
00:24 INFO: Saving lambda class: reactor/ipc/netty/channel/FluxReceive$$Lambda$2
00:24 INFO: Saving lambda class: reactor/ipc/netty/channel/FluxReceive$$Lambda$3
00:24 INFO: Saving lambda class: reactor/ipc/netty/channel/FluxReceive$$Lambda$4
00:24 INFO: Saving lambda class: reactor/ipc/netty/channel/FluxReceive$$Lambda$5
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$1
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$2
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$3
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$4
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$5
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$6
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$7
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$8
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$9
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$10
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$11
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$12
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver$$Lambda$13
00:24 INFO: Saving lambda class: reactor/ipc/netty/resources/DefaultLoopResources$$Lambda$1
00:24 INFO: Saving lambda class: org/springframework/boot/devtools/restart/classloader/RestartClassLoader$$Lambda$1
00:24 INFO: Saving lambda class: org/springframework/boot/devtools/restart/classloader/RestartClassLoader$$Lambda$2
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$1
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$2
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$3
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$4
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$5
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$6
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$7
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$8
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$9
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$10
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$11
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$12
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$13
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$14
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$15
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$16
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$17
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$18
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$19
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$20
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$21
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$22
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$23
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$24
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$25
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$26
00:24 INFO: Saving lambda class: org/springframework/web/reactive/function/BodyExtractors$$Lambda$27
00:24 INFO: Saving lambda class: org/springframework/web/reactive/result/method/annotation/RequestHeaderMethodArgumentResolver$$Lambda$1
00:24 INFO: Saving lambda class: org/springframework/web/filter/reactive/ForwardedHeaderFilter$$Lambda$1
00:25 INFO: Saving lambda class: org/springframework/web/filter/reactive/ForwardedHeaderFilter$$Lambda$2
00:25 INFO: Saving lambda class: org/springframework/web/filter/reactive/ForwardedHeaderFilter$$Lambda$3
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$1
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$2
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$3
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$4
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$5
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$6
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$7
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$8
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$9
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$10
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$11
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$12
00:25 INFO: Saving lambda class: reactor/core/publisher/ParallelFlux$$Lambda$13
00:25 INFO: Saving lambda class: reactor/ipc/netty/tcp/TcpServer$Builder$$Lambda$1
00:25 INFO: Saving lambda class: reactor/ipc/netty/tcp/TcpServer$Builder$$Lambda$2
00:25 INFO: Saving lambda class: reactor/ipc/netty/ByteBufMono$$Lambda$1
00:25 INFO: Saving lambda class: reactor/ipc/netty/ByteBufMono$$Lambda$2
00:25 INFO: Saving lambda class: reactor/ipc/netty/ByteBufMono$$Lambda$3
00:25 INFO: Saving lambda class: reactor/ipc/netty/ByteBufMono$$Lambda$4
00:25 INFO: Saving lambda class: reactor/ipc/netty/ByteBufMono$$Lambda$5
00:25 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFunctions$DefaultExchangeFunction$$Lambda$1
00:25 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFunctions$DefaultExchangeFunction$$Lambda$2
00:25 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFunctions$DefaultExchangeFunction$$Lambda$3
00:25 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFunctions$DefaultExchangeFunction$$Lambda$4
00:25 INFO: Saving lambda class: org/springframework/web/reactive/function/client/ExchangeFunctions$DefaultExchangeFunction$$Lambda$5
00:25 INFO: Saving lambda class: com/gluonhq/charm/glisten/control/FloatingActionButton$a$$Lambda$1
00:25 INFO: Saving lambda class: com/gluonhq/charm/glisten/control/FloatingActionButton$a$$Lambda$2
00:25 INFO: Saving lambda class: com/gluonhq/charm/glisten/control/FloatingActionButton$a$$Lambda$3
00:25 INFO: Saving lambda class: com/gluonhq/charm/glisten/control/FloatingActionButton$a$$Lambda$4
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$1
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$2
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$3
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$4
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$5
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$6
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$7
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$8
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$9
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$10
00:25 INFO: Saving lambda class: org/springframework/http/HttpHeaders$$Lambda$11
00:25 INFO: Saving lambda class: org/springframework/util/concurrent/ListenableFutureTask$$Lambda$1
00:25 INFO: Saving lambda class: org/springframework/util/concurrent/ListenableFutureTask$$Lambda$2
00:26 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Callbacks$$Lambda$1
00:26 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Callbacks$$Lambda$2
00:26 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Callbacks$$Lambda$3
00:26 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Callbacks$$Lambda$4
00:26 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Callbacks$$Lambda$5
00:26 INFO: Saving lambda class: org/springframework/boot/util/LambdaSafe$Callbacks$$Lambda$6
00:26 INFO: Saving lambda class: org/springframework/security/web/server/authentication/AuthenticationWebFilter$$Lambda$1
00:26 INFO: Saving lambda class: org/springframework/security/web/server/authentication/AuthenticationWebFilter$$Lambda$2
00:26 INFO: Saving lambda class: org/springframework/security/web/server/authentication/AuthenticationWebFilter$$Lambda$3
00:26 INFO: Saving lambda class: org/springframework/security/web/server/authentication/AuthenticationWebFilter$$Lambda$4
00:26 INFO: Saving lambda class: org/springframework/security/web/server/authentication/AuthenticationWebFilter$$Lambda$5
00:26 INFO: Saving lambda class: org/springframework/web/reactive/result/view/script/ScriptTemplateView$$Lambda$1
00:26 INFO: Saving lambda class: org/springframework/web/reactive/result/view/script/ScriptTemplateView$$Lambda$2
00:27 INFO: Saving lambda class: com/gluonhq/charm/glisten/control/ExceptionDialog$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/client/DefaultClientRequestBuilder$BodyInserterRequest$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/client/DefaultClientRequestBuilder$BodyInserterRequest$$Lambda$2
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/client/DefaultClientRequestBuilder$BodyInserterRequest$$Lambda$3
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/client/DefaultClientRequestBuilder$BodyInserterRequest$$Lambda$4
00:27 INFO: Saving lambda class: org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping$$Lambda$2
00:27 INFO: Saving lambda class: org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher$$Lambda$2
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/server/RouterFunctions$FilteredRouterFunction$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/web/bind/support/WebRequestDataBinder$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/beans/CachedIntrospectionResults$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/beans/CachedIntrospectionResults$$Lambda$2
00:27 INFO: Saving lambda class: org/springframework/beans/CachedIntrospectionResults$$Lambda$3
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/server/DefaultServerResponseBuilder$AbstractServerResponse$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/web/reactive/function/server/DefaultServerResponseBuilder$AbstractServerResponse$$Lambda$2
00:27 INFO: Saving lambda class: org/springframework/http/client/InterceptingClientHttpRequest$InterceptingRequestExecution$$Lambda$1
00:27 INFO: Saving lambda class: org/springframework/http/client/InterceptingClientHttpRequest$InterceptingRequestExecution$$Lambda$2
00:27 ERROR: Failed to run Retrolambda
java.lang.RuntimeException: Failed to backport class: org/springframework/http/server/reactive/UndertowServerHttpResponse
at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:129)
at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:107)
at net.orfjackal.retrolambda.Transformers.backportClass(Transformers.java:47)
at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:92)
at net.orfjackal.retrolambda.Main.main(Main.java:28)
Caused by: java.lang.RuntimeException: Failed to backport lambda or method reference: org/springframework/http/server/reactive/UndertowServerHttpResponse.lambda$applyHeaders$0(Ljava/lang/String;Ljava/util/List;)V (7)
at net.orfjackal.retrolambda.lambdas.LambdaReifier.reifyLambdaClass(LambdaReifier.java:44)
at net.orfjackal.retrolambda.lambdas.BackportLambdaInvocations$InvokeDynamicInsnConverter.backportLambda(BackportLambdaInvocations.java:194)
at net.orfjackal.retrolambda.lambdas.BackportLambdaInvocations$InvokeDynamicInsnConverter.visitInvokeDynamicInsn(BackportLambdaInvocations.java:183)
at net.orfjackal.retrolambda.asm.ClassReader.readCode(ClassReader.java:1519)
at net.orfjackal.retrolambda.asm.ClassReader.readMethod(ClassReader.java:1032)
at net.orfjackal.retrolambda.asm.ClassReader.accept(ClassReader.java:708)
at net.orfjackal.retrolambda.asm.ClassReader.accept(ClassReader.java:521)
at net.orfjackal.retrolambda.Transformers.lambda$transform$4(Transformers.java:107)
at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:125)
... 4 more
Caused by: java.lang.IllegalAccessException: no such method: org.springframework.http.server.reactive.UndertowServerHttpResponse.lambda$applyHeaders$0(String,List)void/invokeSpecial
at java.lang.invoke.MemberName.makeAccessException(MemberName.java:867)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1003)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1386)
at java.lang.invoke.MethodHandles$Lookup.findSpecial(MethodHandles.java:1004)
at net.orfjackal.retrolambda.lambdas.Types.toMethodHandle(Types.java:53)
at net.orfjackal.retrolambda.lambdas.Types.asmToJdkType(Types.java:26)
at net.orfjackal.retrolambda.lambdas.LambdaReifier.callBootstrapMethod(LambdaReifier.java:117)
at net.orfjackal.retrolambda.lambdas.LambdaReifier.reifyLambdaClass(LambdaReifier.java:39)
... 12 more
Caused by: java.lang.NoClassDefFoundError: io/undertow/server/handlers/Cookie
at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:975)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1000)
... 18 more
Caused by: java.lang.ClassNotFoundException: io.undertow.server.handlers.Cookie
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at net.orfjackal.retrolambda.NonDelegatingClassLoader.loadClass(NonDelegatingClassLoader.java:27)
... 21 more
> Task :applyRetrolambda FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':applyRetrolambda'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4m 50s
6 actionable tasks: 4 executed, 2 up-to-date
///////////////////////////////////////////////// //////////////////////////////////////////////////// /////////
答案 0 :(得分:1)
您确定要将具有所有这些依赖性的该应用移植到Android吗?
如果是这种情况,恐怕是不可能的。
在您的情况下,retrolambda任务失败时:
java.lang.RuntimeException: Failed to backport class: org/springframework/http/server/reactive/UndertowServerHttpResponse
...
java.lang.ClassNotFoundException: io.undertow.server.handlers.Cookie
原因是ClassNotFoundException
,这意味着该依赖项不可用。
换句话说,您需要为Android任务解析build.gradle列表的所有传递依赖项。
在这种情况下,Spring框架的问题在于将optional
用于依赖项。
基于此answer,似乎必须手动添加所有optional
依赖项(例如runtime
或androidRuntime
依赖项)。
在这种情况下,optional dependencies的列表很大。所有不同的相关框架(例如spring-core
)也是如此。
我花了一点时间来添加所有必需的依赖关系以通过Retrolambda任务:
runtime('io.undertow:undertow-core:2.0.11.Final')
runtime('io.undertow:undertow-servlet:2.0.11.Final')
runtime 'org.springframework:spring-jms:5.0.6.RELEASE'
runtime 'javax.jms:javax.jms-api:2.0'
runtime 'org.springframework:spring-context-support:5.0.6.RELEASE'
runtime 'io.reactivex:rxjava:1.3.8'
runtime 'io.reactivex:rxjava-reactive-streams:1.2.1'
runtime("org.eclipse.jetty:jetty-server:9.4.11.v20180605") {
exclude group: "javax.servlet", module: "javax.servlet-api"
}
runtime("org.eclipse.jetty:jetty-servlet:9.4.11.v20180605") {
exclude group: "javax.servlet", module: "javax.servlet-api"
}
runtime('org.eclipse.jetty.websocket:websocket-client:9.4.11.v20180605') {
exclude group: "javax.servlet", module: "javax.servlet-api"
}
runtime('org.eclipse.jetty.websocket:websocket-servlet:9.4.11.v20180605') {
exclude group: "javax.servlet", module: "javax.servlet-api"
}
runtime('org.eclipse.jetty:jetty-webapp:9.4.11.v20180605') {
exclude group: "javax.servlet", module: "javax.servlet-api"
}
runtime 'org.springframework.batch:spring-batch-core:4.0.1.RELEASE'
runtime 'org.springframework:spring-jdbc:5.0.6.RELEASE'
runtime 'org.infinispan:infinispan-core:9.3.1.Final'
runtime 'org.infinispan:infinispan-commons:9.3.1.Final'
runtime 'javax.websocket:javax.websocket-api:1.1'
runtime 'org.mongodb:mongodb-driver-async:3.8.0'
runtime 'com.google.code.gson:gson:2.8.5'
runtime 'org.springframework.kafka:spring-kafka:2.1.8.RELEASE'
runtime 'io.searchbox:jest:5.3.3'
runtime 'org.springframework.security:spring-security-oauth2-client:5.0.6.RELEASE'
runtime 'org.springframework.security:spring-security-oauth2-jose:5.0.6.RELEASE'
runtime 'com.datastax.cassandra:cassandra-driver-core:3.5.1'
runtime 'com.datastax.cassandra:cassandra-driver-mapping:3.5.1'
runtime 'org.springframework.data:spring-data-cassandra:2.0.9.RELEASE'
runtime 'org.springframework.data:spring-data-rest-core:3.0.8.RELEASE'
runtime 'com.querydsl:querydsl-core:4.2.1'
runtime 'org.springframework.amqp:spring-rabbit:2.0.5.RELEASE'
runtime 'io.micrometer:micrometer-core:1.0.6'
runtime 'net.sf.ehcache:ehcache:2.10.5'
runtime("org.jetbrains.kotlin:kotlin-reflect:1.2.51")
runtime("org.jetbrains.kotlin:kotlin-stdlib:1.2.51")
runtime 'org.hibernate:hibernate-core:5.3.3.Final'
runtime 'org.hibernate.validator:hibernate-validator:6.0.11.Final'
runtime 'org.flywaydb:flyway-core:5.1.4'
runtime "org.apache.logging.log4j:log4j-api:2.11.0"
runtime "org.apache.logging.log4j:log4j-core:2.11.0"
runtime 'org.liquibase:liquibase-core:3.6.2'
runtime 'org.thymeleaf:thymeleaf-spring5:3.0.9.RELEASE'
runtime 'com.couchbase.client:core-io:1.6.0'
runtime 'com.hazelcast:hazelcast:3.10.4'
runtime 'com.squareup.okhttp3:okhttp:3.11.0'
runtime 'javax.enterprise:cdi-api:2.0.SP1'
runtime 'com.netflix.hystrix:hystrix-core:1.5.12'
runtime 'org.aspectj:aspectjtools:1.9.1'
runtime 'com.couchbase.client:couchbase-spring-cache:2.1.0'
runtime 'org.webjars:webjars-locator-core:0.35'
runtime 'org.springframework:spring-orm:5.0.6.RELEASE'
runtime 'org.apache.httpcomponents:httpclient:4.5.6'
runtime 'org.glassfish.jersey.core:jersey-server:2.27'
runtime 'org.apache.kafka:kafka-streams:1.1.1'
因此,现在您将传递retrolambda任务,但随后将遇到下一个问题:
> Task :GluonApplicationTestApp:mergeClassesIntoJar FAILED
Execution failed for task ':GluonApplicationTestApp:mergeClassesIntoJar'.
> archive contains more than 65535 entries.
如果您检查文件夹\build\javafxports\tmp\android\retrolambda
,则会发现500 MB的文件超过150000 *.class
。即使您可以使用所有这些条目创建一个dex文件,应用程序的大小也会很大。
最后,您应该检查其他alternatives,它们不涉及在客户端移动应用程序中添加庞大的后端。
例如,您可以检查此sample,该后端在后端使用Spring,在客户端使用Gluon Mobile,并使用CloudLink将两者连接。