Status Update
Comments
ag...@google.com <ag...@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?
ag...@google.com <ag...@google.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.
ch...@google.com <ch...@google.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.
il...@google.com <il...@google.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.
ga...@google.com <ga...@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)
uc...@google.com <uc...@google.com>
xa...@google.com <xa...@google.com>
xa...@google.com <xa...@google.com>
sr...@google.com <sr...@google.com>
sr...@google.com <sr...@google.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.
sr...@google.com <sr...@google.com> #8
I'll look more into this, thanks for the detailed description and repro case!
sr...@google.com <sr...@google.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.
sr...@google.com <sr...@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?
Description
Similarly, doing a full build produced this error message:
"Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option"
Specifically, "specific proper "-jvm-target" option" is... not helpful. Where do I specify this option?
A web search told me various things, including several different things I could do in my Gradle files.
I found that I could change related information in the Project Structure dialog. Specifically, I went to the Modules item, clicked on the "app" item, and was able to set "Target compatibility" to 1.8.
But that didn't work. It turns out I had to also set "Source Compatibility," which isn't obvious from the wording of the error message.
So, 2 things:
- clarify what is meant by -jvm-target, since it's not clear where that option is supposed to be set (in the tool? in the dialogs? in a build file? in an Android Studio launch command?)
- if we need to change both source *and* target, fix the error message to be more correct and specific.
Build: AI-192.7142.36.36.6071332, 201912131544,
AI-192.7142.36.36.6071332, JRE 1.8.0_212-release-1586-b4-5784211x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.6, screens 1440x900; Retina
AS: 3.6 RC 1; Kotlin plugin: 1.3.61-release-Studio3.6-1; Android Gradle Plugin: 3.6.0-rc01; Gradle: 5.6.4; 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)
IMPORTANT: Please read