Status Update
Comments
co...@protonmail.com <co...@protonmail.com> #2
ch...@google.com <ch...@google.com> #3
tn...@google.com <tn...@google.com> #4
co...@protonmail.com <co...@protonmail.com> #5
at com.android.tools.idea.run.editor.DeployTargetPickerDialog.<init>(DeployTargetPickerDialog.java:144)
at com.android.tools.idea.run.editor.ShowChooserTargetProvider.showPrompt(ShowChooserTargetProvider.java:113)
at com.android.tools.idea.run.AndroidRunConfigurationBase.getDeployTarget(AndroidRunConfigurationBase.java:600)
at com.android.tools.idea.run.AndroidRunConfigurationBase.doGetState(AndroidRunConfigurationBase.java:281)
at com.android.tools.idea.run.AndroidRunConfigurationBase.getState(AndroidRunConfigurationBase.java:241)
at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:158)
at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:55)
at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:50)
at com.intellij.execution.ProgramRunnerUtil.executeConfigurationAsync(ProgramRunnerUtil.java:92)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:41)
at com.intellij.execution.impl.ExecutionManagerImpl.restart(ExecutionManagerImpl.java:93)
at com.intellij.execution.impl.ExecutionManagerImpl.access$300(ExecutionManagerImpl.java:44)
at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:442)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:232)
at com.intellij.util.Alarm$Request.runSafely(Alarm.java:356)
at com.intellij.util.Alarm$Request.run(Alarm.java:343)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:228)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:755)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
co...@protonmail.com <co...@protonmail.com> #6
tn...@google.com <tn...@google.com> #7
il...@google.com <il...@google.com> #8
Can you attach a sample project or enough code to reproduce this issue?
co...@protonmail.com <co...@protonmail.com> #9
I don't have a sample project, but the error points to this file seemingly?
package com.rollertoaster.app
import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.RecordedRequest
val MY_DISPATCHER: Dispatcher =
object : Dispatcher() {
override fun dispatch(request: RecordedRequest): MockResponse {
return MockResponse().setResponseCode(404)
}
}
Some more info here:
But besides that I don't have a repo that shows this publicly available.
co...@protonmail.com <co...@protonmail.com> #10
This is an unrelated issue, but Tor says "Methods aren't guaranteed to have a surrounding class so probably safest to use the ?. operator..." and so maybe that's what has to be done in this lint check as well?
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 0a9efa914d322810f8dc8d9ba06e79d164c8892d
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jun 09 13:01:36 2021
Fix lint crashes on kotlin top level properties
We need to handle cases where kotlin functions don't have a surrounding
class.
This change allows the surrounding class to be null and in that case we
just skip the check.
RelNote: "The `OnCreateDialogIncorrectCallback` lint check will no
longer crash when declaring a top level variable."
Test: kotlin anonymous object test
Bug: 189967522
Change-Id: I62de88c344cee0cb9deda26c9e5fc27247cf2d95
M fragment/fragment-lint/src/main/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetector.kt
M fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
il...@google.com <il...@google.com> #12
We've improved this lint check and the updated check will be available in Fragment 1.4.0-alpha03.
co...@protonmail.com <co...@protonmail.com> #13
Looking forward to it. Thanks!
de...@gmail.com <de...@gmail.com> #14
```
../../src/main/java/com/sample/app/App.kt: Unexpected failure during lint analysis of App.kt (this is a bug in lint or one of the libraries it depends on)
Message: class androidx.fragment.lint.OnCreateDialogIncorrectCallbackDetector$UastHandler tried to access protected method 'org.jetbrains.kotlin.psi.KtClassOrObject org.jetbrains.uast.kotlin.KotlinUClass.getKtClass()' (androidx.fragment.lint.OnCreateDialogIncorrectCallbackDetector$UastHandler is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @10f53730; org.jetbrains.uast.kotlin.KotlinUClass is in unnamed module of loader java.net.URLClassLoader @4489af75)
The crash seems to involve the detector androidx.fragment.lint.OnCreateDialogIncorrectCallbackDetector.
You can try disabling it with something like this:
android {
lint {
disable "DialogFragmentCallbacksDetector"
}
}
Stack: IllegalAccessError:OnCreateDialogIncorrectCallbackDetector$UastHandler.visitClass(OnCreateDialogIncorrectCallbackDetector.kt:78)
←UElementVisitor$DispatchPsiVisitor.visitClass(UElementVisitor.kt:553)
←UElementVisitor$DelegatingPsiVisitor.visitClass(UElementVisitor.kt:1162)
←AbstractKotlinUClass.accept(AbstractKotlinUClass.kt:43)
←ImplementationUtilsKt.acceptList(implementationUtils.kt:29)
```
AGP 7.4.0-alpha03
Kotlin 1.6.20-M1
de...@gmail.com <de...@gmail.com> #15
de...@gmail.com <de...@gmail.com> #16
de...@gmail.com <de...@gmail.com> #17
co...@protonmail.com <co...@protonmail.com> #18
Are all of your deps up to date? This problem was fixed for me.
Description
Updated to compose beta08 and kotlin 1.5.10. Running lint gives me a few errors like this now:
Error: Unexpected failure during lint analysis of MyCustomClass.kt (this is a bug in lint or one of the libraries it depends on)