Status Update
Comments
gg...@google.com <gg...@google.com> #2
Caused by: java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0.
at kotlin.collections.EmptyList.get(Collections.kt:37)
at kotlin.collections.EmptyList.get(Collections.kt:25)
at com.android.tools.lint.Main.createLintRequest(Main.java:1747)
at com.android.tools.lint.Main.run(Main.java:280)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at com.android.build.gradle.internal.lint.AndroidLintWorkAction.invokeLintMainRunMethod(AndroidLintWorkAction.kt:103)
at com.android.build.gradle.internal.lint.AndroidLintWorkAction.runLint(AndroidLintWorkAction.kt:90)
at com.android.build.gradle.internal.lint.AndroidLintWorkAction.execute(AndroidLintWorkAction.kt:64)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62)
... 23 more
// Set up lint project dependencies based on the model
boolean isReporting = argumentState.mode == LintDriver.DriverMode.MERGE;
List<LintModelModuleProject> roots =
LintModelModuleProject.resolveDependencies(projects, isReporting);
lintRequest = new LintRequest(client, Collections.emptyList());
lintRequest.setProjects(roots);
if (isReporting) {
EnumSet<Platform> platforms =
roots.get(0).isAndroidProject() ? Platform.ANDROID_SET : Platform.JDK_SET;
lintRequest.setPlatform(platforms);
}
It seems like that roots
is empty (for lintReportJvm
).
vi...@google.com <vi...@google.com> #3
Execution failed for task ':lintReportJvm'
OP, are you applying the lint plugin to the root Gradle project? I'm guessing that's the problem here... assuming you only want to apply the lint plugin to modules with source code, etc.
al...@gmail.com <al...@gmail.com> #4
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 1
- Android Gradle Plugin 8.9.0-alpha01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
ra...@google.com <ra...@google.com>
pa...@google.com <pa...@google.com>
tn...@google.com <tn...@google.com> #5
Thank you people!
an...@google.com <an...@google.com> #6
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 3
- Android Gradle Plugin 8.9.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
kotlin always let ()->Unit as Runnable. But android Handler cannot removeCallbacks. Ex:
Above code will be compiled into:
The ()->Unit function has be wrapped by diff lambda, it's not same one. So, the android Handler can't removeCallback.
We have to replace with Runnable statement.
Could you please add some warning message just like SharedPreferences' commit() to removeCallback when using kotlin?