0

我遇到了来自领域 parceler 的错误,提示“代码生成未成功完成”。我正在使用 parceler 1.1.13 和 Realm。为了确保错误不是来自更改,我检查了一个较旧的版本。但是,问题仍然存在。我使缓存无效并重新启动了应用程序。我还清理并重建了项目,但错误仍然存​​在。

我会很感激一些帮助。

这是错误:

error: Parceler: Code generation did not complete successfully.
  org.parceler.transfuse.transaction.TransactionRuntimeException: Encountered ErrorType 
<error>, unable to recover
Parceler: Code generation did not complete successfully.

at org.parceler.transfuse.adapter.element.AnnotationValueConverterVisitor.visitSimple(AnnotationValueConverterVisitor.java:159)
at org.parceler.transfuse.adapter.element.AnnotationValueConverterVisitor.visitString(AnnotationValueConverterVisitor.java:101)
at org.parceler.transfuse.adapter.element.AnnotationValueConverterVisitor.visitString(AnnotationValueConverterVisitor.java:40)
at jdk.compiler/com.sun.tools.javac.code.Attribute$Error.accept(Attribute.java:398)
at org.parceler.transfuse.adapter.element.AnnotationValueConverterVisitor.visitArray(AnnotationValueConverterVisitor.java:136)
at org.parceler.transfuse.adapter.element.AnnotationValueConverterVisitor.visitArray(AnnotationValueConverterVisitor.java:40)
at jdk.compiler/com.sun.tools.javac.code.Attribute$Array.accept(Attribute.java:348)
at org.parceler.transfuse.adapter.element.ASTElementAnnotation.getProperty(ASTElementAnnotation.java:74)
at org.parceler.internal.ParcelableAnalysis.innerAnalyze(ParcelableAnalysis.java:78)
at org.parceler.internal.ParcelableAnalysis.analyze(ParcelableAnalysis.java:68)
at org.parceler.internal.ParcelTransactionWorker.innerRun(ParcelTransactionWorker.java:48)
at org.parceler.internal.ParcelTransactionWorker.innerRun(ParcelTransactionWorker.java:31)
at org.parceler.transfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
at org.parceler.transfuse.transaction.CodeGenerationScopedTransactionWorker.innerRun(CodeGenerationScopedTransactionWorker.java:47)
at org.parceler.transfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
at org.parceler.transfuse.transaction.ScopedTransactionWorker.run(ScopedTransactionWorker.java:55)
at org.parceler.transfuse.transaction.Transaction.run(Transaction.java:77)
at org.parceler.guava.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
at org.parceler.transfuse.transaction.TransactionProcessorPool.execute(TransactionProcessorPool.java:60)
at org.parceler.transfuse.transaction.TransactionProcessorComposite.execute(TransactionProcessorComposite.java:37)
at org.parceler.transfuse.transaction.TransactionProcessorChain.execute(TransactionProcessorChain.java:38)
at org.parceler.internal.ParcelProcessor.execute(ParcelProcessor.java:83)
at org.parceler.ParcelAnnotationProcessor.process(ParcelAnnotationProcessor.java:84)
at org.gradle.api.internal.tasks.compile.processing.DelegatingProcessor.process(DelegatingProcessor.java:62)
at org.gradle.api.internal.tasks.compile.processing.IsolatingProcessor.process(IsolatingProcessor.java:50)
at org.gradle.api.internal.tasks.compile.processing.DelegatingProcessor.process(DelegatingProcessor.java:62)
at org.gradle.api.internal.tasks.compile.processing.TimeTrackingProcessor.access$401(TimeTrackingProcessor.java:37)
at org.gradle.api.internal.tasks.compile.processing.TimeTrackingProcessor$5.create(TimeTrackingProcessor.java:99)
at org.gradle.api.internal.tasks.compile.processing.TimeTrackingProcessor$5.create(TimeTrackingProcessor.java:96)
at org.gradle.api.internal.tasks.compile.processing.TimeTrackingProcessor.track(TimeTrackingProcessor.java:117)
at org.gradle.api.internal.tasks.compile.processing.TimeTrackingProcessor.process(TimeTrackingProcessor.java:96)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:980)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:816)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1220)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1356)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1258)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:936)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at org.gradle.internal.compiler.java.IncrementalCompileTask.call(IncrementalCompileTask.java:74)
at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:94)
at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:55)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:40)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:97)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:51)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:51)
at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:37)
at org.gradle.api.internal.tasks.compile.ModuleApplicationNameWritingCompiler.execute(ModuleApplicationNameWritingCompiler.java:46)
at org.gradle.api.internal.tasks.compile.ModuleApplicationNameWritingCompiler.execute(ModuleApplicationNameWritingCompiler.java:36)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompiler.execute(CleaningJavaCompiler.java:53)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory.lambda$createRebuildAllCompiler$0(IncrementalCompilerFactory.java:98)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:61)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:45)
at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:59)
at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:51)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
4

1 回答 1

0

最近,我也遇到这个问题尝试降级你的android studio版本,4.1版本对我来说很好用

https://developer.android.com/studio/archive 你可以在那里查看其他版本

于 2021-07-09T17:12:34.670 回答