Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
In case the zip file is missing some files, I put the reproducer on github:
Also I forgot to mention but the error happens in IntelliJ "Event Log" window. The build works well.
xo...@google.com <xo...@google.com>
xo...@google.com <xo...@google.com> #3
Thank you very much for the report, and the reproducer. I've submitted a fix for this to our master branch.
As a workaround until that is released (it will eventually become part of Android Studio 4.2), could you try
BuildHelper.apply({ rootProject }.invoke())
as a replacement for
BuildHelper.apply(rootProject)
If that works (or doesn't!) for you without the internal error in your full context, that would be useful for me to know -- it will affect whether we should try to backport the fix.
Thanks again!
ma...@gmail.com <ma...@gmail.com> #4
Thanks for the quick fix!
The workaround does work 👍. Another workaround is to rename the apply
method to something else. It might not be possible in all cases but in this case this is code I have control over so it was easy to rename the method.
xo...@google.com <xo...@google.com> #5
Excellent. Since we have reasonably low-impact workarounds, I think we probably won't backport this to 4.1 -- I'll close this bug now. Thanks once again :-)
Description
This is a bug when using IntelliJ 2020.2 to develop Android projects. During Gradle Sync, the error bellow happens:
Gradle sync failed: Property found to be invalid, this should never happen!
I chase it down to having some custom logic in
buildSrc
that contains aapply
method:A sample reproducer project is attached
Studio Build: Version of IntelliJ: 2020.2 Version of the Android IntelliJ Plugin: (bundled) 10.4.0.202.6948.5 Version of Gradle Plugin: 4.0.1 Version of Gradle: 6.5 Version of Java: 1.8 OS: MacOS
Steps to Reproduce:
Full Stacktrace: