Status Update
Comments
ph...@gmail.com <ph...@gmail.com> #2
This one is beginning to be severe, after updating Kotlin to 1.6.0-RC2 the incidents have become more frequent (I hope they aren't related).
The only remedy is still to restart AS.
Still in Chipmunk 2021.2.1.3
ph...@sprylab.com <ph...@sprylab.com> #3
Hi Roar, thank you for the report. I see a few other similar looking bug reports so I'll prioritize this.
Please let me know if you notice a pattern in which the incidents happen.
xa...@google.com <xa...@google.com>
an...@gmail.com <an...@gmail.com> #4
Roar, I tried playing with a small data binding project and I couldn't reproduce the issue. Do you know what triggers it? Like after a refactoring or some other action? A sample project would be very helpful to us too.
tr...@gmail.com <tr...@gmail.com> #5
office and one HP i5/16GB at home office, sme kotlin based project.
Happens mostly when changing binding related code like adding data members
in xml layouts, but also just out og the blue when opening code with
fragments and data bindings.
I'll send you an collection of my logs tomorrow.
I have experienced similar issues (approx 2-3 years ago, then I asked for a
"regenerate bindings"-button, but it was "pinned down" then (no hard
feelings for that then :) ).
BTW I have seen this issue sporadicly, but then I could click
Build->Generate sources gradle tasks to fix it, but now it will not fix it.
tor. 4. nov. 2021, 21:47 skrev <buganizer-system@google.com>:
pa...@google.com <pa...@google.com> #6
For the time being, you can get the binding back by going Build > Clean Project
instead of restarting Studio.
ta...@gmail.com <ta...@gmail.com> #7
tr...@gmail.com <tr...@gmail.com> #8
Good tip, I'll try that next time.
I am providing my zipped logged directory, so you have something to work on.
Pls send me an pm/email if you need access to the project.
RG
tr...@gmail.com <tr...@gmail.com> #9
well, it just happened again here. I'm now on
Android Studio Chipmunk | 2021.2.1 Canary 4 Build #AI-212.5284.40.2112.7863073, built on October 28, 2021 Runtime version: 11.0.12+7-b1504.28-7817840 amd64 VM: OpenJDK 64-Bit Server VM by Oracle Corporation Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 8 Registry: external.system.auto.import.disabled=true
With gradle set to using my system default JDK: openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)
and my project set to compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 coreLibraryDesugaringEnabled true }
Everything was fine until I started editing my styles; individual style.xml files and some attributes set in layouts. Don't think it matters, but I was editing 'textColor' attributes specifically; NOT adding or removing any elements. Running the app in the emulator in debug mode (but not actively using the debugger). Out of the blue, a java file I had open lost its view binding. Every other such file I open subsequently lost its vb. Looking in the 'generated' folder, all vb files are present and correct.
Dunno if it's relevant, but here is the idea.log from the timeframe:
2021-11-11 12:03:29,495 [5901837] INFO - .idea.res.ResourceUpdateTracer - Unresolved resource reference "@attr/colorOnBackgroun" in fastscroller\src\main\res\drawable\fastscroll_overlay_classic.xml
--- Resource update trace: ---
2021-11-11 12:03:29.495
2021-11-11 12:03:29,495 [5901837] INFO - .idea.res.ResourceUpdateTracer - Unresolved resource reference "@attr/colorOnBackgroun" in fastscroller\src\main\res\drawable\fastscroll_overlay_classic.xml
--- Resource update trace: ---
2021-11-11 12:03:29.495
2021-11-11 12:03:29,994 [5902336] ERROR - GradleBuildOutputUtil.kt - Exception 'java.lang.Throwable: Output listing build file is not available for output type Apk in IdeBuildTasksAndOutputInformationImpl(assembleTaskName=assembleDebug, assembleTaskOutputListingFile=null, bundleTaskName=null, bundleTaskOutputListingFile=null, apkFromBundleTaskName=null, apkFromBundleTaskOutputListingFile=null)' was reported 40 times 2021-11-11 12:03:36,955 [5909297] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 12:04:00,136 [5932478] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 12:04:00,464 [5932806] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 12:04:24,029 [5956371] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 12:04:46,179 [5978521] INFO - gs.CompletionMLRankingSettings - ML Completion enabled, experiment group=13 for: C/C++ 2021-11-11 12:04:46,179 [5978521] INFO - gs.CompletionMLRankingSettings - ML Completion enabled, experiment group=11 for: Kotlin 2021-11-11 12:04:46,240 [5978582] INFO - rationStore.ComponentStoreImpl - Saving Project(name=NeverTooManyBooks, containerState=COMPONENT_CREATED, componentStore=C:\Data\Code\NeverTooManyBooks)VcsDirectoryMappings took 18 ms 2021-11-11 12:04:55,595 [5987937] INFO - rationStore.ComponentStoreImpl - Saving Project(name=NeverTooManyBooks, containerState=COMPONENT_CREATED, componentStore=C:\Data\Code\NeverTooManyBooks)RenderSettings took 13 ms 2021-11-11 14:45:48,438 [15640780] INFO - rationStore.ComponentStoreImpl - Saving Project(name=NeverTooManyBooks, containerState=COMPONENT_CREATED, componentStore=C:\Data\Code\NeverTooManyBooks)GradleMigrationSettings took 29 ms 2021-11-11 14:45:58,299 [15650641] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 14:46:03,672 [15656014] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 14:46:38,793 [15691135] INFO - System.impl.PopupMenuPreloader - Popup menu 'Project View Popup Menu' preloaded at 'ProjectViewPopup' in 9 ms 2021-11-11 14:46:38,794 [15691136] INFO - System.impl.PopupMenuPreloader - Popup menu 'Project View Popup Menu' preloaded at 'ProjectViewPopup' in 9 ms 2021-11-11 14:46:47,988 [15700330] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 14:46:58,912 [15711254] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 14:48:08,870 [15781212] INFO - rationStore.ComponentStoreImpl - Saving appwhatsNew took 15 ms 2021-11-11 14:49:33,474 [15865816] WARN - itors.literals.LiteralsManager - Only Kotlin is supported for LiveLiterals 2021-11-11 14:52:51,578 [16063920] INFO - gs.CompletionMLRankingSettings - ML Completion enabled, experiment group=13 for: C/C++ 2021-11-11 14:52:51,578 [16063920] INFO - gs.CompletionMLRankingSettings - ML Completion enabled, experiment group=11 for: Kotlin 2021-11-11 14:56:07,503 [16259845] INFO - j.ide.actions.RevealFileAction - Exit code 1
again, not sure if it's relevant/related, but the "@attr/colorOnBackgroun" mentioned above is in fact ""?attr/colorOnBackground" (with a '?' and a 'd' at the end) in my code.
pa...@google.com <pa...@google.com> #10
Reporting my last "crashes" with bindings.
pa...@google.com <pa...@google.com> #11
ok... I'm now having to quit/restart studio after every layout edit
I basically have a bunch of layouts with the outer tag a ConstraintLayout. I'm copy/pasting a new root tag CoordinatorLayout in all of them. So for each file, I paste the new CoordinatorLayout top section, remove the namespace declaration from the ConstraintLayout and finally close the CoordinatorLayout tag at the bottom of the file. Now open the java file... yup... bindings are lost; restart Studio.
Edit: each layout is present twice: portrait + "land"
ta...@gmail.com <ta...@gmail.com> #12
Please se #6 above for short remedy.
hu...@google.com <hu...@google.com> #13
sure I saw #6; but for me restarting Studio is faster then a 'clean' and subsequent full-build.
I can't tell for sure (yet) but it seems to happen most/only when editing layouts which exist in both portrait + "land"
pa...@google.com <pa...@google.com> #14
Thanks for the updates guys and keep them coming.
FYI our team is stretched thin and with the holidays on the horizon, I don't think we can get to this until a few weeks from now. I do want to get this fixed for Android Studio Chipmunk. Thanks for your patience.
jo...@gmail.com <jo...@gmail.com> #15
I'm trying to get this 100% reproducible. Let me know if there are any extra debug flags that you want me to set.
pa...@google.com <pa...@google.com> #16
I now feel strongly for a "recalculate bindings button" or menu point.
so...@gmail.com <so...@gmail.com> #17
BTW, Clean Project mentioned in #6 doesn't always remedy.
I want to refer other issues where I have had similar problems:
Attaching logs.
ai...@gmail.com <ai...@gmail.com> #18
It is more likely to happen while you are building your project.
b9...@gmail.com <b9...@gmail.com> #19
2021-11-28 22:24:40,850 [1307885] WARN - .caches.project.IdeaModuleInfo - Could not find correct module information. Reason: Analyzing element of type class com.android.tools.idea.databinding.psiclass.LightBrClass$LightBRField with no containing file Text: public static final int tileProviderName;
I think this points to the cause of the issue. I was able to reproduce the same warning message by adding another DB variable to the layout.
ai...@gmail.com <ai...@gmail.com> #20
Less likely before build, most likely during and after build.
we...@gmail.com <we...@gmail.com> #21
Upgraded to Kotlin plugin "212-1.6.10-RC-release-906-AS5457.46", still same issues occurres (if that should have any influence).
pa...@google.com <pa...@google.com> #22
Android Studio Chipmunk | 2021.2.1 Canary 6
Build #AI-212.5457.46.2112.7968471, built on December 3, 2021
Runtime version: 11.0.12+7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 6144M
Cores: 8
Registry: analyze.exceptions.on.the.fly=true, external.system.auto.import.disabled=true, documentation.show.toolbar=true
Non-Bundled Plugins: CMD Support (1.0.5), com.intellij.ideolog (203.0.27.0), org.intellij.plugins.markdown (212.5457.16), PythonCore (212.5457.59), CheckStyle-IDEA (5.59.1), com.google.mad-scorecard (1.2)
hu...@google.com <hu...@google.com> #23
ed...@gmail.com <ed...@gmail.com> #24
To me it happens a lot, it's frustrating.
Almost every time I change some IDs in XML.
Every time I build after I change something in local.properties (I have some configuration properties there, API base URL, secrets, stuff like that).
Happens on kotlin source code, happens on java source code.
Android Studio Chipmunk | 2021.2.1 Canary 7
Build #AI-212.5457.46.2112.8043657, built on January 5, 2022
Runtime version: 11.0.12+7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 12
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: Rider UI Theme Pack (0.10.1), Dart (212.5632), io.flutter (63.3.3)
va...@gmail.com <va...@gmail.com> #25
Update: I have found the cause of this issue and it's likely a regression caused by refactoring of Studio's resource repository system last year. The TL;DR explanation is data binding backend stopped getting updates from the resources repositories (ie: when you add/remove something to the layout xml), and stopped maintaining in-memory objects of the views or at least supplied stale objects to the IDE.
I'm collaborating with other teams to get the proper fix in, hopefully cherrypicked for CM beta 3.
ed...@gmail.com <ed...@gmail.com> #26
Fix is in for Dolpha Canary 3. Waiting for cherry pick into CM beta 3.
mv...@gmail.com <mv...@gmail.com> #27
Fix is cherry picked into CM beta 3.
mv...@gmail.com <mv...@gmail.com> #28
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 Dolphin Canary 2 (2021.3.1.2)
- Android Gradle Plugin 7.3.0-alpha02
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!
we...@gmail.com <we...@gmail.com> #29
Adequate feedbacks do always lead to a better product!!
I hope ours have helped.
BTW: Do AGP v7.4 contain this fix ?
ma...@gmail.com <ma...@gmail.com> #30
Yes your feedback has certainly helped!
The fix is in Studio in the above versions. It's not related to AGP (compilation has always worked fine).
ch...@gmail.com <ch...@gmail.com> #31
Note !
I see intermediate lost bindings, especially when (sometimes) doing changes to xml scheme and when (everytime) after updating project to new AS version (in this particular situation Dolphin Canary 7)
see picture.
Attaching logs.
mu...@gmail.com <mu...@gmail.com> #32
We are still loosing bindings: This time in this configuration:
Build: AI-213.7172.25.2113.8421465, 202204072206,
AI-213.7172.25.2113.8421465, JRE 11.0.13+0-b1751.21-8125866x64 JetBrains s.r.o., OS Windows 11(amd64) v10.0 , screens 2400.0x1350.0, 1920.0x1080.0, 1920.0x1080.0, 768.0x1366.0
AS: Dolphin | 2021.3.1 Canary 8; Kotlin plugin: 213-1.6.20-M1-release-205-AS6777.52; Android Gradle Plugin: 7.3.0-alpha08; Gradle: 7.4.2; Gradle JDK: version 11.0.13; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
This time it happened moments after changing corresponding xml file. Normally I see intermediate loss, and it regains in 10-15 secs, but this time it stays put.
hu...@google.com <hu...@google.com> #33
I tried to reproduce this issue on a small project using the steps that worked before, but no luck so far. I might need to use your big project again.
In the mean time, if you have accurate repro steps, please provide them here. Thanks!
ta...@gmail.com <ta...@gmail.com> #34
Please send me a PM...
ja...@google.com <ja...@google.com> #35
Just adding another incident, occures most likely after editing an xml layout file, and after you have made a compile/build/run.
ta...@gmail.com <ta...@gmail.com> #36
Loosing Bindings are becoming more severe i Dolphin Beta 1, especially when editing XML files.
kr...@gmail.com <kr...@gmail.com> #37
May this also be related to loosing bindings.
Suddenly new android:id="@+id/id_name"
aren't created either.
Building the project will create them. That's unusual.
hu...@google.com <hu...@google.com> #38
Could you please describe the problem with android:id="@+id/id_name"
in greater detail. Thank you.
ta...@gmail.com <ta...@gmail.com> #39
Sometimes when editing xmls and adds a view and adds an androi:id element or edits an existing android:id (and use @+id) the id name is marked with red with complaints that the id name is not found or doesn't exist. I expects the id to be created silently. If I compile/run my app the red marking seems to disappear and id is created.
ya...@gmail.com <ya...@gmail.com> #40
Could you please enable Help > Diagnostic Tools > Trace Resource Updates, close and reopen the project, wait until you see an unresolved android:id="@+id/id_name"
and attach a fresh idea.log to this bug. Thank you.
Description
Starting moving over to AndroidX this afternoon and hit an issue with Dagger. Jetifier seems to force 2.16 even when you have a newer version (2.17) declared.
The issue seems to be this rule:
More details are available here: