Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #3
hmm we should not be trying generating code but looks like we do when we try to run equals.
this is the related CL:
ag/3299967
It is a revert CL but the CL it reverts does not really have this line of code :/.
over to mount@ for some background.
this is the related CL:
ag/3299967
It is a revert CL but the CL it reverts does not really have this line of code :/.
over to mount@ for some background.
mo...@google.com <mo...@google.com> #4
Maybe you can take a look at this.
yo...@gmail.com <yo...@gmail.com> #5
For those following along, it seems to be related to having a `var` property in a Kotlin class referenced as a variable in the layout.
yb...@google.com <yb...@google.com> #6
here is an app that reproduces the error:
just open activity_main in studio.
since this error is happening in ModelClass, we can actually easily implement toJavaCode there.
just open activity_main in studio.
since this error is happening in ModelClass, we can actually easily implement toJavaCode there.
yb...@google.com <yb...@google.com> #7
I have a CL ready, waiting for review:
ag/3638147
ag/3638147
sa...@google.com <sa...@google.com> #8
Thank you Yigit, please also help ensure that the ag/3638147 is CPed into the studio-3.1-dev branch.
yb...@google.com <yb...@google.com> #9
fixed. also cherry picked into 3.1 dev branch.
Description
AI-173.4580418, JRE 1.8.0_152-release-1024-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.12.6 unknown, screens 3008x1692, 1680x1050; Retina
Android Gradle Plugin: 3.1.0-beta3
Gradle: 4.5
Get this error, not sure what causes it...
why generate
java.lang.UnsupportedOperationException: why generate
at com.android.tools.idea.lang.databinding.model.PsiModelClass.toJavaCode(PsiModelClass.java:49)
at android.databinding.tool.reflection.ModelClass.getTypeName(ModelClass.java:688)
at android.databinding.tool.reflection.ModelClass.equals(ModelClass.java:694)
at android.databinding.tool.reflection.ModelClass.findSetter(ModelClass.java:614)
at android.databinding.tool.reflection.ModelClass.findGetterOrField(ModelClass.java:523)
at com.android.tools.idea.lang.databinding.DataBindingXmlReferenceContributor$2.getReferencesByElement(DataBindingXmlReferenceContributor.java:196)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:135)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:123)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:102)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:59)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:53)
at com.android.tools.idea.lang.databinding.DataBindingPsiElement.getReferences(DataBindingPsiElement.java:32)
at org.intellij.plugins.intelliLang.references.InjectedReferencesContributor.getInjectedReferences(InjectedReferencesContributor.java:56)
at org.intellij.plugins.intelliLang.references.InjectedReferencesInspection$1.visitElement(InjectedReferencesInspection.java:40)
at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
at com.android.tools.idea.lang.databinding.psi.impl.PsiDbExprImpl.accept(PsiDbExprImpl.java:43)
at com.android.tools.idea.lang.databinding.psi.impl.PsiDbRefExprImpl.accept(PsiDbRefExprImpl.java:42)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:82)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:70)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.doInspectInjectedPsi(LocalInspectionsPass.java:750)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$inspectInjectedPsi$6(LocalInspectionsPass.java:338)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1130)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)