Status Update
Comments
pa...@gmail.com <pa...@gmail.com> #2
1. Android Studio version and OS type and version
2. Screenshots or videos of the issue
3. idea.log file (select Help > Show Log in Finder / Explorer)
4. Thread dumps if the issue is a freezing or non-responding UI.
For more information on what’s needed and how to obtain this information please read the guide at
ka...@google.com <ka...@google.com> #3
Please find the required data below: Android Studio version: Android Studio Ladybug Feature Drop | 2024.2.2 OS type and version: Microsoft Windows 10 Pro (10.0.19045 Build 19045)
I didn't have screenshots now. The issue I faced is that, when changing some code in the XML file, it take more time to reflect in the preview than usual. And sometimes, after opening the project, the preview takes more time to load and shows a loader with message 'Initializing'.
ka...@google.com <ka...@google.com> #4
There is a frequent exception logged as a warning, in conjunction with "Recomputed N fields for..." logging (sometimes duplicated for the same fqn? see the 464 fields below):
2025-01-09 18:20:05,404 [28441383] INFO - #o.j.a.a.InnerRClassBase - Recomputed 987 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.R.string, repository=AppResourceRepository@709C7B72}
2025-01-09 18:20:19,922 [28455901] INFO - #com.android.ddmlib - Device 'motorola-moto_g52-ZD22262ND3' jdwp process '17149' is now known as pkg='com.sensei.engrow.alpha.ro.debug' (proc='com.sensei.engrow.alpha.ro.debug')
2025-01-09 18:23:02,900 [28618879] INFO - #o.j.a.a.InnerRClassBase - Recomputed 464 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.R.layout, repository=AppResourceRepository@709C7B72}
2025-01-09 18:23:02,906 [28618885] INFO - #o.j.a.a.InnerRClassBase - Recomputed 464 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.R.layout, repository=AppResourceRepository@573BFD3D}
2025-01-09 18:23:02,908 [28618887] INFO - #o.j.a.a.InnerRClassBase - Recomputed 169 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.test.R.layout, repository=TestAppResourceRepository@13D0D7B5}
2025-01-09 18:23:03,284 [28619263] INFO - #c.i.d.JVMResponsivenessMonitor - JVM responsiveness: {avg: 2520.7322222222224, 50%: 1900, 99%: 15303, 99.9%: 26911, max: 35327 }ns, x{3600 measurements}
2025-01-09 18:23:20,756 [28636735] WARN - #o.j.k.i.b.p.ModuleInfoProvider - Could not find correct module information
org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Analyzing element of type class com.intellij.psi.impl.source.PsiJavaFileImpl in non-physical file of type class com.intellij.psi.impl.source.PsiJavaFileImpl
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider.collectByElement(ModuleInfoProvider.kt:193)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider.access$collectByElement(ModuleInfoProvider.kt:73)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider$collect$1.invoke(ModuleInfoProvider.kt:108)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider$collect$1.invoke(ModuleInfoProvider.kt:107)
at org.jetbrains.kotlin.idea.base.util.SeqKt$seq$$inlined$Sequence$1.iterator(Sequences.kt:682)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProviderKt$unwrap$1$iterator$1.<init>(ModuleInfoProvider.kt:488)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProviderKt$unwrap$1.iterator(ModuleInfoProvider.kt:487)
at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:167)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProviderUtils.firstOrNull(ModuleInfoProviderUtils.kt:43)
I suspect the non-physical PsiJavaFileImpl is an R class. I found
As for preview rendering, I tried opening four layout files from Signal-Android and the majority of time is spent in reflection:
Eugene, do you know which JBR has the fix for
ka...@google.com <ka...@google.com>
an...@google.com <an...@google.com> #5
It was only 21.0.3b509.4 version with a fix: from Ladybug.1 Canary 1 till Canary 8
We lost patch in subsequent JBR update. ouch.
Description
Description
AGP <8.6 used to allow running Java 8 toolchain for tests. This is no longer possible because of a fix applied for Robolectric too widely.
Repro
gradlew test
Logs
Root cause
is caused by the fix for https://issuetracker.google.com/issues/248929512 .
It can't be unconditionally added as different Java versions support different flags.
This particular flag ( Jigsaw in Java 9.
--add-opens
) was introduced as part ofVersions
Studio Build: N/A
Version of Gradle Plugin: 8.6.0
Version of Gradle: 8.10
Version of Java: 17+ running Gradle, 8 toolchain running tests
OS: any