2017-10-09 1 views
1

J'ai un module pour lequel assembleRelease tâche fonctionne parfaitement bien dans ma machine locale. Mais sur Jenkins lorsque j'exécute la même tâche (assembleRelease), il échoue à :kaptReleaseKotlin avec l'erreur suivante.: tâche kaptReleaseKotlin échoue sur Jenkins (mais fonctionne sur la machine locale)

e: java.lang.IllegalStateException: failed to analyze: java.lang.RuntimeException: Failed to parse data binding compiler options. Params: 
kapt.kotlin.generated : /jenkins/jenkins/workspace/MySpace/build/generated/source/kaptKotlin/release 
    at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:57) 
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:138) 
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:170) 
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:58) 
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:93) 
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:46) 
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:92) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$2.invoke(CompileServiceImpl.kt:386) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$2.invoke(CompileServiceImpl.kt:98) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:832) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:98) 
    at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:859) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:831) 
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:385) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) 
    at sun.rmi.transport.Transport$1.run(Transport.java:200) 
    at sun.rmi.transport.Transport$1.run(Transport.java:197) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196) 
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) 
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) 
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.RuntimeException: Failed to parse data binding compiler options. Params: 
kapt.kotlin.generated : /jenkins/jenkins/workspace/MySpace/build/generated/source/kaptKotlin/release 
    at android.databinding.annotationprocessor.ProcessDataBinding.readArguments(ProcessDataBinding.java:159) 
    at android.databinding.annotationprocessor.ProcessDataBinding.process(ProcessDataBinding.java:65) 
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794) 
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705) 
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91) 
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035) 
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176) 
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) 
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068) 
    at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:73) 
    at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:42) 
    at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:205) 
    at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:166) 
    at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:82) 
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:96) 
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:106) 
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:83) 
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:377) 
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:68) 
    at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:96) 
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:368) 
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:133) 
    ... 30 more 
Caused by: java.lang.NumberFormatException: null 
    at java.lang.Integer.parseInt(Integer.java:542) 
    at java.lang.Integer.parseInt(Integer.java:615) 
    at android.databinding.tool.DataBindingCompilerArgs.readFromOptions(DataBindingCompilerArgs.java:92) 
    at android.databinding.annotationprocessor.ProcessDataBinding.readArguments(ProcessDataBinding.java:152) 
    ... 51 more 

:kaptReleaseKotlin FAILED 

Je ne parviens pas à déboguer cette erreur.

+0

Je doute que vous serez en mesure de l'un ou l'autre, cela ressemble à un problème de compilateur – Zoe

+0

@Zoe: Alors, comment cela fonctionne dans le local? – Ashwin

+0

Différentes versions de kotlin? Pas sûr, pas très familier avec Jenkins. Tout ce que je vois est le crash lié à une compilation de kotlin, ce n'est pas un problème d'application – Zoe

Répondre

0

Un bon vieux works on my machine but not on yours question

Ressemble différents outils de construction des problèmes de versioning. Peut-être que votre version locale de Gradle est différente de Jenkins. On détecte ce NumberFormatException et on l'accepte simplement.

solutions possibles:

S'il vous plaît nous mettre à jour comment cela a été résolu!