vide
11/17/2023, 12:23 PM./gradlew check
fails with an error message I don't really understand. 🧵
Lint found an issue registry (androidx.compose.runtime.lint.RuntimeIssueRegistry)
which contains some references to invalid API:
org.jetbrains.kotlin.analysis.api.session.KtAnalysisSessionProvider:
[...]
vide
11/17/2023, 12:24 PM> Task :app:lintDemoDebug FAILED
/home/runner/.gradle/caches/transforms-3/d23adda673b13392f4128346b11591b3/transformed/runtime-release/jars/lint.jar: Error: Library lint checks reference invalid APIs; these checks will be skipped!
Lint found an issue registry (androidx.compose.runtime.lint.RuntimeIssueRegistry)
which contains some references to invalid API:
org.jetbrains.kotlin.analysis.api.session.KtAnalysisSessionProvider: org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeTokenFactory getTokenFactory()
(Referenced from androidx/compose/runtime/lint/AutoboxingStateCreationDetector.class)
Therefore, this lint check library is not included
in analysis. This affects the following lint checks:
AutoboxingStateValueProperty
AutoboxingStateCreation
CoroutineCreationDuringComposition
FlowOperatorInvokedInComposition
ComposableLambdaParameterNaming
ComposableLambdaParameterPosition
ComposableNaming
StateFlowValueCalledInComposition
CompositionLocalNaming
MutableCollectionMutableState
ProduceStateDoesNotAssignValue
RememberReturnType
OpaqueUnitKey
UnrememberedMutableState
To use this lint check, upgrade to a more recent version
of the library. [ObsoleteLintCustomCheck]
Explanation for issues of type "ObsoleteLintCustomCheck":
Lint can be extended with "custom checks": additional checks implemented by
developers and libraries to for example enforce specific API usages
required by a library or a company coding style guideline.
The Lint APIs are not yet stable, so these checks may either cause a
performance degradation, or stop working, or provide wrong results.
This warning flags custom lint checks that are found to be using obsolete
APIs and will need to be updated to run in the current lint environment.
It may also flag issues found to be using a newer version of the API,
meaning that you need to use a newer version of lint (or Android Studio or
Gradle plugin etc) to work with these checks.
vide
11/17/2023, 12:59 PMvide
11/17/2023, 1:33 PMvide
11/20/2023, 11:51 AMJakub Ledwon
02/01/2024, 1:33 PM# workaround for <https://issuetracker.google.com/issues/311218673>
# see versions here: <https://maven.google.com/web/index.html?q=lint#com.android.lint:com.android.lint.gradle.plugin>
#noinspection GradleDependency
android.experimental.lint.version=8.3.0-beta02
But I was wondering if there was something else I could do instead of waiting for AGP 8.3.0 to be stable blob thinking upside down?vide
02/01/2024, 1:45 PMJakub Ledwon
02/01/2024, 2:07 PMUnsafeOptInUsageError
reported by lint. I have couple of places where I have "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
added to freeCompilerArgs
, but now it started being reported by the lint. Switching from freeCompilerArgs
to @OptIn
annotation doesn’t help eithervide
02/01/2024, 2:11 PMAlvin Dizon
02/23/2024, 2:00 PMUnsafeOptInUsageError
for ExperimentalMaterial3Api
despite opting in via freeCompilerArgs
Jakub Ledwon
02/26/2024, 7:04 AMvanshg
03/05/2024, 12:51 AMUnsafeOptInUsageError
Alvin Dizon
03/13/2024, 5:10 AM@file:OptIn(ExperimentalMaterial3Api::class)
on top of the file that had the UnsafeOptInUsageError
issues, and it worked. Which is weird since I still have -opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
added to freeCompilerArgs
vanshg
03/13/2024, 5:26 AMthe issue seems specific to data classes using types that require opt-in