Status Update
Comments
am...@google.com <am...@google.com>
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #2
Yigit, I haven't had time to try reproducing yet, but they have a github link which is nice. What's weird though is I don't think anything has changed recently at all, but maybe you're aware? Although, looking at the callstack, it may be an AGP issue? If it looks like that to you too, bounce it back to me.
OP: Was this a regression? And just to make sure, when you say "run ./gradlew help
", you're seeing this from the command line? Or from within Studio?
va...@gmail.com <va...@gmail.com> #3
I'm seeing this from command line.
Yes this seems to be a regression starting from 7.0.0-alpha10.
Note that the project I linked doesn't use databinding at all, enabling the build config flag is all that's needed to reproduce this.
yo...@gmail.com <yo...@gmail.com> #4
Thanks for the quick reply. I have a short open window right now so I'll try to repro and see if I can figure out which component this is best for.
ba...@gmail.com <ba...@gmail.com> #5
I can repro what OP is seeing. It may be tempting to move this to the data binding component but this seems more like an AGP change. I don't believe the data binding compiler has been changed recently, around the time AGP 7.0.0-alpha10 went out.
am...@google.com <am...@google.com> #6
Also, slightly more direct steps (although it amounts to the same thing as what's in
- Sync the github project somewhere (
git clone https://github.com/ReactiveCircus/streamlined.git
) - Double check everything's working as expected (
./gradlew help
should work) - Edit
app/build.gradle.kts
: Search forbuildFeatures
and adddataBinding = true
as the first entry, abovebuildConfig
- Now, things are expected to break (
./gradlew help
should throw an exception) - Edit
buildSrc/src/main/kotlin/io/github/reactivecircus/streamlined/Dependencies.kt
: change the AGP version to7.0.0-alpha09
- Now, things are expected to work again(
./gradle help
should work)
ba...@gmail.com <ba...@gmail.com> #7
yea this seems unrelated to data binding as we didn't change data binding itself
There were some resource related changes so cc'ing Iza in case they might be related but i don't think so. This seems like a lifecycle issue.
pa...@gmail.com <pa...@gmail.com> #8
I'll look more into this, thanks for the detailed description and repro case!
ba...@gmail.com <ba...@gmail.com> #9
This affects even 1.50-M1 kotlin, and the code resolving the attributes is here:
As a workaround to get data binding working, I'll add a new task that merges dependencies R.txt files into one, and then pass that single file to kapt/db. So while the incorrect resolving will still be there while jetbrains fixes this issue, it will allow the non-transitive R + data binding builds to succeed.
am...@google.com <am...@google.com> #10
nice find!
There is actually another issue about incremental compilation, do you think they might be related to the other issue you've mentioned?
an...@google.com <an...@google.com> #11
to...@fitbod.me <to...@fitbod.me> #12
ni...@gmail.com <ni...@gmail.com> #13
This affects even 1.50-M1 kotlin, and the code resolving the attributes is here:
https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/kapt/Kapt3KotlinGradleSubplugin.kt#L354
This is similar to/the same as
Regarding
cy...@gmail.com <cy...@gmail.com> #14
am...@google.com <am...@google.com> #15
Thanks! Do we know if this is going to be included in the next canary (or one after that)? It's been blocking us from updating AGP / Studio for 4 releases now so I'd really love to get back to the bleeding edge soon:)
ch...@gmail.com <ch...@gmail.com> #16
lu...@mindbodyonline.com <lu...@mindbodyonline.com> #17
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 Chipmunk Canary 2 (2021.2.1.2)
- Android Gradle Plugin 7.2.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!
ks...@letsenvision.com <ks...@letsenvision.com> #18
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 Bumblebee Beta 2 (2021.1.1.15)
- Android Gradle Plugin 7.1.0-beta02
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!
jo...@gmail.com <jo...@gmail.com> #19
The fixes for this issue are now also available in:
- Android Studio Koala Feature Drop | 2024.1.2 Canary 1
- Android Gradle Plugin 8.6.0-alpha01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
mi...@gmail.com <mi...@gmail.com> #20
am...@google.com <am...@google.com> #21
For people getting this:
-
Can you please provide a sample project in which you can reproduce this issue? I can no longer reproduce it in nowinandroid, as suggested in
comment #4 -
Does the workaround suggested in
work for you?comment #17
Thanks!
al...@phoops.it <al...@phoops.it> #22
I confirm that the workaround suggested in
ar...@gmail.com <ar...@gmail.com> #23
di...@gmail.com <di...@gmail.com> #24
I can also confirm that the fix suggested in
ch...@itgri.ru <ch...@itgri.ru> #25
vi...@gmail.com <vi...@gmail.com> #26
bb...@gmail.com <bb...@gmail.com> #27
Steps to Fix the Issue
Open Run/Debug Configurations:
In Android Studio, go to the top menu and click Run > Edit Configurations.
Alternatively, click the dropdown next to the "Run" button in the toolbar (it shows your current run configuration, e.g., app), then select Edit Configurations.
Select Your Run Configuration:
In the left panel, find your run configuration (e.g., app under "Android App"). Click it to edit it.
If you’re unsure which one is active, it’s usually the one selected in the toolbar when you hit "Run" or "Debug."
Add "Gradle-aware Make" to Before Launch:
Scroll down to the Before Launch section at the bottom of the configuration window. This section lists tasks that run before your app launches.
If "Gradle-aware Make" isn’t already listed, click the + (Add) button.
From the dropdown, select Gradle-aware Make.
If you don’t see it, ensure your project is synced with Gradle (click Sync Project with Gradle Files in the toolbar first).
Apply and Save:
Click Apply, then OK to save the changes and close the dialog.
Run Your Project:
Try running your app again by clicking the Run (green triangle) or Debug (bug icon) button in the toolbar.
"Gradle-aware Make" ensures Gradle builds the necessary artifacts (e.g., APK) before launching, which might resolve the redirect.txt error.
Description
DESCRIBE THE ISSUE IN DETAIL: Android studio is unable to deploy previews and fails with an error Error loading build artifacts from: ./feature/profile/build/intermediates/apk_ide_redirect_file/debugAndroidTest/createDebugAndroidTestApkListingFileRedirect/redirect.txt
STEPS TO REPRODUCE:
Repro on both phyical device and an emulator. Previews display normally in the IDE
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
Build #AI-241.14494.158.2411.11678081, built on April 5, 2024 Runtime version: 17.0.10+0-17.0.10b1087.21-11609105 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Version of Gradle Plugin: 8.3.1 Version of Gradle: 8.7 Version of Java: 21 OS: MacOS Sonoma 14.1.1