Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
A different error using 2.3.0-alpha04 (checked using gradlew core:dependencies).
Source code:
Circle CI build:
* What went wrong:
Execution failed for task ':core:lint'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
Errors found:
/home/circleci/code/core/src/main/java/com/github/shadowsocks/net/HttpsTest.kt: Error: Unexpected failure during lint analysis of HttpsTest.kt (this is a bug in lint or one of the libraries it depends on)
Message: org.jetbrains.kotlin.asJava.elements.KtLightMethodImpl cannot be cast to com.intellij.psi.PsiVariable
The crash seems to involve the detector androidx.lifecycle.lint.NonNullableMutableLiveDataDetector.
You can try disabling it with something like this:
android {
lintOptions {
disable "NullSafeMutableLiveData"
}
}
Stack: ClassCastException:NonNullableMutableLiveDataDetector.visitMethodCall(NonNullableMutableLiveDataDetector.kt:105)←UElementVisitor$DelegatingPsiVisitor.visitMethodCallExpression(UElementVisitor.kt:1079)←UElementVisitor$DelegatingPsiVisitor.visitCallExpression(UElementVisitor.kt:1059)←UCallExpression$DefaultImpls.accept(UCallExpression.kt:85)←UCallExpressionEx$DefaultImpls.accept(UCallExpression.kt:-1)←KotlinUSimpleReferenceExpression$KotlinAccessorCallExpression.accept(KotlinUSimpleReferenceExpression.kt:129)←KotlinUSimpleReferenceExpression.visitAccessorCalls(KotlinUSimpleReferenceExpression.kt:116)←KotlinUSimpleReferenceExpression.accept(KotlinUSimpleReferenceExpression.kt:83)
You can set environment variable LINT_PRINT_STACKTRACE=true to dump a full stacktrace to stdout. [LintError]
/home/circleci/code/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt: Error: Unexpected failure during lint analysis of SubscriptionService.kt (this is a bug in lint or one of the libraries it depends on)
Message: org.jetbrains.kotlin.asJava.elements.KtLightMethodImpl cannot be cast to com.intellij.psi.PsiVariable
The crash seems to involve the detector androidx.lifecycle.lint.NonNullableMutableLiveDataDetector.
You can try disabling it with something like this:
android {
lintOptions {
disable "NullSafeMutableLiveData"
}
}
Stack: ClassCastException:NonNullableMutableLiveDataDetector.visitMethodCall(NonNullableMutableLiveDataDetector.kt:105)←UElementVisitor$DelegatingPsiVisitor.visitMethodCallExpression(UElementVisitor.kt:1079)←UElementVisitor$DelegatingPsiVisitor.visitCallExpression(UElementVisitor.kt:1059)←UCallExpression$DefaultImpls.accept(UCallExpression.kt:85)←UCallExpressionEx$DefaultImpls.accept(UCallExpression.kt:-1)←KotlinUSimpleReferenceExpression$KotlinAccessorCallExpression.accept(KotlinUSimpleReferenceExpression.kt:129)←KotlinUSimpleReferenceExpression.visitAccessorCalls(KotlinUSimpleReferenceExpression.kt:116)←KotlinUSimpleReferenceExpression.accept(KotlinUSimpleReferenceExpression.kt:83)
You can set environment variable LINT_PRINT_STACKTRACE=true to dump a full stacktrace to stdout. [LintError]
yb...@google.com <yb...@google.com> #3
That looks to still be using the previous version. Could you upload a minimal sample project using 2.3.0-alpha05 that reproduces your issue?
ap...@google.com <ap...@google.com> #4
The sample at #1 should be using 2.3.0-alpha05 out of the box. I do not have a minimal sample at the time, sorry.
Description
Component used:
lifecycle-runtime-ktx
Version used:
2.2.0-alpha01 up to 2.3.0-alpha07
The following example should print "1", "2" then "3" but prints "1", "3", "2":
A similar problem existed inhttps://github.com/Kotlin/kotlinx.coroutines/issues/1474
Dispatchers.Main
but was fixed: