Comments (47)
You can use new Android Studio, but have to manually configure old Java 8.
At least in our case it is "only" about JDK version, not about Android Studio version.
from parceler.
I've added this in the app build.gradle, you will need one of the latest kotlin releases for this option.
kapt {
keepJavacAnnotationProcessors = true
}
But be aware this does break al lot of different libraries (e.g. databinding) so I wouldn't recommend this.
from parceler.
Yikes! What are you trying to annotate?
from parceler.
Yikes! What are you trying to annotate?
RealmObject's. They were working fine, but I updated to the the latest version of IntelliJ (2020.3) and this error started to occur. No code changes on my end. I am guessing some library updated that Parceler doesn't like, but the error message "error: Parceler: Code generation did not complete successfully" and this stack trace does not help me in locating the issue.
from parceler.
Can you run the build on the command line?
from parceler.
Can you run the build on the command line?
I encounter the same problem, and I cannot build it from command line:
./gradlew app:assembleGeneric fails
from parceler.
You can try it with:
git clone [email protected]:nextcloud/talk-android.git test
cd test
./gradlew app:assembleGenericRelease
When I open it up in AndroidStudio, let gradle build it and just click "run app" it works.
from parceler.
@tobiasKaminsky - I believe your case is caused by the incompatibility between lombok and other annotation processors like Parceler. See https://stackoverflow.com/questions/37543057/parceler-and-lombok-not-working-together
I am open to a PR to address this problem, if it can be addressed.
from parceler.
- run the same steps in a docker (fresh linux) does work without problems
- run the build step locally after Android Studio compiled it, works
- run talk-android with Android Studio works
so this is really strange.
I also thought it would be a problem with lombok and annotion processors, as you said, but why is it then possible to build it with other ways?
Our case is somehow solved, as we use only Android Studio or CI (and therefore always start with a clean docker container).
In future we will replace Lombok with Kotlin, but it is really strange…
from parceler.
I have the same issue when I updated to latest version of Android Studio. I don't have lombok. The only other annotation processor I have is org.permissionsdispatcher:permissionsdispatcher-processor, but the only thing you annotate there is some functions in activities, so not the same object as parceler. It has been working fine for years, but did break with latest version of Android Studio. I also use Realm.
I've spent hours try to find the solution, but I don't know what the problem is.
The stacktrace is similar to the first one. Here is a part of it:
error: Parceler: Code generation did not complete successfully.
org.parceler.transfuse.transaction.TransactionRuntimeException: Encountered ErrorType <error>, unable to recover
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)
Parceler: Code generation did not complete successfully.
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)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler.execute(CompileJavaBuildOperationReportingCompiler.java:51)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:345)
at org.gradle.api.tasks.compile.JavaCompile.performIncrementalCompilation(JavaCompile.java:239)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:211)
at jdk.internal.reflect.GeneratedMethodAccessor758.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:494)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
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.run(DefaultBuildOperationRunner.java:56)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:479)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:462)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$400(ExecuteActionsTaskExecuter.java:105)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:273)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:251)
at org.gradle.internal.execution.steps.ExecuteStep.lambda$executeOperation$0(ExecuteStep.java:65)
at java.base/java.util.Optional.map(Optional.java:265)
at org.gradle.internal.execution.steps.ExecuteStep.executeOperation(ExecuteStep.java:65)
at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:34)
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47)
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:44)
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)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:34)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:72)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:42)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:53)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:39)
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:44)
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:77)
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:58)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:54)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:32)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:57)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:38)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:63)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:30)
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:176)
at org.gradle.internal.execution.steps.BuildCacheStep.executeAndStoreInCache(BuildCacheStep.java:152)
at org.gradle.internal.execution.steps.BuildCacheStep.lambda$executeWithCache$2(BuildCacheStep.java:126)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at org.gradle.internal.execution.steps.BuildCacheStep.lambda$executeWithCache$3(BuildCacheStep.java:126)
at org.gradle.internal.Try$Success.map(Try.java:162)
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithCache(BuildCacheStep.java:85)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:75)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:47)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:43)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:32)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:39)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:25)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:102)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:95)
at java.base/java.util.Optional.map(Optional.java:265)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:83)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:96)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:52)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:83)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:54)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:88)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:88)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:46)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:34)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:43)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$3.withWorkspace(ExecuteActionsTaskExecuter.java:286)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:43)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:33)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:40)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:30)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:54)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:40)
at org.gradle.internal.execution.impl.DefaultExecutionEngine.execute(DefaultExecutionEngine.java:41)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:183)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:183)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
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)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:411)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:398)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:391)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:377)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:834)
from parceler.
@johncarl81 same for me, updated to a new version of android studio and got the same issue
from parceler.
Also use Realm
from parceler.
@bitsydarel I have the very same issues.
It seemed that AS 4.2 creates this problem. Downgrading to 4.1.3 allowed me to run the project again.
from parceler.
@hdralexandru Did you found from the release notes of the android gradle plugin what’s causing this ?
from parceler.
@hdralexandru Did you found from the release notes of the android gradle plugin what’s causing this ?
No.
We had to release the app ASAP so downgrading did it for us.
We're also migrating to Kotlin Parceler, so this will be enough for us, I don't think we'll look into it any further.
from parceler.
confirm AS 4.2 not working. downgrade to 4.1.3 work fine!
from parceler.
Strange, and I assume running it through Gradle directly still works. Any more clues why it's failing?
from parceler.
Have some issue. Have any ideas, how to fix it without downgrade?
from parceler.
It's something to do with some type Parceler is analyzing coming up as the type. I'll investigate further later this weekend.
If anyone is interested, this is an open-source project and the annotation processor is (should be) easy to debug.
from parceler.
On AS 4.1.3 I would get this warning, but the build would still finish:
Issue detected with org.parceler.ParcelAnnotationProcessor. Expected 1 originating source file when generating [path_to_project]/Development/Android/[app_name]/app/build/generated/source/kapt/storeGoogleProductionDebug/io/realm/[my_object]RealmProxy$$Parcelable.java, but detected 0: [].
Maybe AS 4.2 crashes the build directly?
I've tried to add
kapt {
arguments {
arg("-AparcelerStacktrace") // or --AparcelerStacktrace or AparcelerStrackTrace
}
}
But I've been given the warning that the argument has not been used.
from parceler.
Strange thing is that AS 4.2 with the android gradle plugin 4.1.3 still make the build fail.
but downgrade to AS 4.1.3 does not make the build fail.
the processor does not give insightful error for this issue and the lib provide many functionality so debugging the processor would be difficult.
would be great if the processor would at least point the object creating this issue.
from parceler.
AS 4.2 now uses Java 11 as default.
We have a project (https://github.com/nextcloud/talk-android) which fails with JDK 11, but not with 8.
I run both times: ./gradlew --no-build-cache cleanBuildCache clean assembleGplay
Java 11:
./gradlew -v
------------------------------------------------------------
Gradle 6.7.1
------------------------------------------------------------
Build time: 2020-11-16 17:09:24 UTC
Revision: 2972ff02f3210d2ceed2f1ea880f026acfbab5c0
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 11.0.11 (Oracle Corporation 11.0.11+9)
OS: Linux 5.10.34-1-lts amd64
Java 8:
./gradlew -v
------------------------------------------------------------
Gradle 6.7.1
------------------------------------------------------------
Build time: 2020-11-16 17:09:24 UTC
Revision: 2972ff02f3210d2ceed2f1ea880f026acfbab5c0
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 1.8.0_292 (Oracle Corporation 25.292-b10)
OS: Linux 5.10.34-1-lts amd64
from parceler.
@johncarl81 Did you find anything during the investigation of the problem?
from parceler.
Has anyone found a fix or workaround for this yet? It's a bit frustrating to need to stay on an old version of Android Studio to be able to build your projects, and it will not be a sustainable solution. :/
from parceler.
This is what I'm using but still manage to fail.
`------------------------------------------------------------
Gradle 6.7.1
Build time: 2020-11-16 17:09:24 UTC
Revision: 2972ff02f3210d2ceed2f1ea880f026acfbab5c0
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 1.8.0_232 (AdoptOpenJDK 25.232-b09)
OS: Mac OS X 10.15.7 x86_64
`
from parceler.
Let's hope @johncarl81 who know how it should work, can find a solution soon!
from parceler.
@tobiasKaminsky how to manually configure old Java 8 please?
from parceler.
On Arch there is a script to change it system wide.
Within AS it should be enough to go to File -> project settings and then choose JDK 8, but I do not use this, as I also need to use gradle from CLI, so I switch to JDK 8 entirely.
from parceler.
You can use new Android Studio, but have to manually configure old Java 8.
At least in our case it is "only" about JDK version, not about Android Studio version.
Just want to confirm that Tobias is correct, setting the compiler for gradle to Java 8 in Android Studio 4.2.x fixes the issue. It looks like it's from making the jump from 8 -> 11, maybe to do with access to private members via reflection going away in Java 9? (just a random guess). You can make the change in file/ project structure/sdk location/jdk location.
from parceler.
Ok, it seems the problem is referencing classes that have yet to be generated, like the Realm proxy classes. So situations like the following:
@Parcel(implementations = {com_example_parcelertest_VisitRealmProxy.class},
value = BEAN,
analyze = Visit.class)
public class Visit extends RealmObject {
...
}
causes an <error>
type to be referenced in the implemenations
parameter, because (presumably) Realm generates this later in the Realm plugin? Is this correct? I haven't played with the interplay between gradle plugins and annotation processors much, are the realm proxies generated after the annotation processors do their thing?
from parceler.
I'm not sure if the execution order realm plugin is to blame, as it's really depending on the JDK used for compiling. Having said that i've been unable to reproduce the issue without the realm plugin activated. So different JDK could change the order of plugin execution? I'm not that familiar with plugins, so really don't know:(
But interestingly when running the project tests, and switching the project SDK to 11 the ParcelableGeneratorTest
all fails. Running the same code with SDK 1.8 all passes correct.
from parceler.
Yeah, that's likely unrelated - It's failing due to robolectric which apparently needs some attention with the JDK 11 upgrade.
from parceler.
I've been digging around a bit more, and some thing i've noticed, by using the "old" annotationProcessor, instead of kapt I can get the plugin to work using JDK11. But unfortunately this does generate a whole lot of different problems using modern Android jetpack libraries. (i've used the kapt keepJavacAnnotationProcessors
flag for this).
from parceler.
@tgobbens where did you add this? In project or app build.gradle? And in which part of the build.gradle?
from parceler.
Strange, and I assume running it through Gradle directly still works. Any more clues why it's failing?
It fails if the java version is 11.
Setting JAVA_HOME
to a JDK in version 8 works for me.
So instead of building with AS, i'm using ./gradlew
after set JAVA_HOME manually in the terminal
Example on MacOS :
$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
$ ./gradlew blablabla
from parceler.
Is there any information on how to build / debug the plugin so I could try to debug? Currently this issue is preventing us from upgrading to Gradle 7.0 making it impossible to use Android Compose.
from parceler.
It's pretty straightforward. First, you clone and build the parceler project:
git clone [email protected]:johncarl81/parceler.git
cd parceler
mvn clean install
Then open up the project in your favorite IDE to prepare to debug.
Next, build your project with debugging on (I'm assuming you're using gradle here):
Add the following to your gradle.properties file:
org.gradle.daemon=false
org.gradle.debug=true
Run the build:
./gradlew clean assembleDebug
This should pause and wait for you to attach the debugger.
Next attach the debugger from your IDE with the parceler project. The Intellij configuration for me looks like the following:
Hope this works for you @tgobbens
from parceler.
Unfortunately due to some time-constrains and my limited knowledge about annotation processors i've not been able to fix this issue. What I've notices from debugging the app is when the running using JDK 11 when entering the process
function in the first round the roundEnvironment
variable seems to have an "" in het implementation
type in it's the (to parcel) element, metadata. When running the same using JDK 1.8 this not showing this error and is displaying correct.
from parceler.
Any updates on this problem?
from parceler.
Still no update on this one? It would be nice to be able to update Java version beyond v1.8!
from parceler.
@tgobbens Did you have more time to look into this to see if you could find a solution? Or if @johncarl81 have more time now to help fixing the bug? It would be extremely appreciated!
from parceler.
I didn't put any more effort into this issue. instead decided to migrate away from this library.
from parceler.
You're using Realm database, right?
If you have the opportunity, could you please provide some details for steps to move away from this library? I think many in this thread would appreciate some brief information about that and some examples.
from parceler.
Yes, the problem for me was indeed the combination with Realm. Migrating away from this library was tricky as a lot of our legacy code was relying on the functionality. Eventually we took the generated <name>$$Parcelable.java
from the build folder and added these next to the actual RealmObjects. This allowed us to disable the annotation processor / kap and thus migrate to JDK 1.8. Obvious downside is current models cannot change. So whenever a change is needed to one of the models we now are trying to migrate them to not require parcel functionality. This can be done for example by sending an id and reading the value from the realm-database in the receiving class. Note that this is also more inline with current Android navigation architecture recommendations.
from parceler.
Thanks for the information, I'll give it a try!
from parceler.
@bisydarel @hdralexandru @toadz @johncarl81 @dimzhurwork @AndyScherziner @Maxxan @tobiasKaminsky @Draketheb4dass @kingd-richer @tgobbens @kwiky
Hi folks, I am running into exact same problem. Has anyone finally figured out how to get Parceler and Realm to work with latest released Android Studio?
from parceler.
Having same issue on AS 2023.1.1, @sergiva-mp manage to get it work on your side ?
from parceler.
Related Issues (20)
- Ability to treat reflection warnings as errors HOT 5
- Parceler fails when used with with Lifecycle-viewmodel 2.2.0 HOT 7
- Facing Vulnerabilities in parceler library HOT 1
- Facing Vulnerabilities in parceler library HOT 1
- Polymorphism documentation not updated? HOT 6
- Cannot get working with navigation graph HOT 1
- Crashing on background HOT 4
- ParcelAnnotationProcessor.process take lot amount of time. HOT 15
- Unable to find generated Parcelable class HOT 1
- Cant find class to parcel ! HOT 1
- Can't generate code HOT 3
- Unable to Marshall with Parceler HOT 2
- Errors in HashMap$$PackageHelper HOT 3
- cannot running with kapt HOT 1
- Parceler: Code generation did not complete successfully. org.parceler.transfuse.transaction.TransactionRuntimeException: Encountered ErrorType <error>, unable to recover HOT 4
- [Request Feature] Support for Kotlin Symbol Processing
- Parceler code generation fails on AS 2023.3.1
- Getters and Setter Alphabetically Order for Write and Read
- Not sure how to convert a Cursor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parceler.