Cannot resolve symbol 'de.fayard.*' in Android Studio
When using this plugin, the versionFor method import gets marked as an error by the IDE because the de namespace cannot be resolved. The plugin works as expected, however.
I am using version 0.10.1
This is how it looks:

Gradle Sync issue?
I can't see what would be the problem apart from that.
I don't think so, had this problem since the beginning and updated AS and Gradle several times in between. I can check with 0.11.0 though
Edit: Still happening on AS 2020.3.1 + Gradle 7.1.1 and refreshVersions 0.11.0
I can reproduce it.
Hello, @itsandreramon, did you configure refreshVersions for the buildSrc as well, as recommended on the setup page on the website for Groovy DSL users?
https://jmfayard.github.io/refreshVersions/setup/#if-you-use-groovy-dsl-ie-buildgradle-files-not-kts
@itsandreramon Still waiting for your answer.
@LouisCAD I configured buildSrc and it works now. However, I think the docs should be more clear, that you should configure buildSrc as well. The docs currently only say:
"Auto-completion for dependency notations won’t work out of the box."
In my case, I am not using auto-completion because I use version catalogs and the statement above makes it seem optional. Anyways, thank you for the help and the project!
Gotcha, I'll consider updating the docs to reflect that, thanks for the update, glad it's now working on your end.
We are also considering automatically configuring buildSrc BTW.
Thanks for the tips. This has been annoying me for a long time.
By the way, I found I had to just include the following code in buildSrc/settings.gradle
pluginManagement {
plugins {
id 'de.fayard.refreshVersions'
}
}
I'm just pointing this out as the URL you linked to @LouisCAD suggested the following:
pluginManagement {
plugins {
id 'de.fayard.refreshVersions' version '0.40.0'
}
}
plugins {
id 'de.fayard.refreshVersions'
}
I wanted to avoid stipulating the version number here in buildSrc/settings.gradle as I am already doing this in my ./settings.gradle.
@taylors1512 Is Gradle sync working with that in IntelliJ IDEA?
@taylors1512 @LouisCAD does not work on my end
That's what I expected, and that's why refreshVersions docs show to specify the version for the buildSrc as well.
If you don't, when Gradle sync tries to run the buildSrc in standalone mode, it can't find the version and fails.
Reopening as a reminder to alert users with an error message when buildSrc is not set up but Groovy DSL is used.
sorry, just saw your question @LouisCAD.
Actually, yes, correct, my method isn't working - i.e. stipulating the plugin without the version number. Maybe last time I did it the official way, and then by accident it worked when I tried after without the version number?
Cheers for the tips again and clarification.
I think the documentation is fine? https://jmfayard.github.io/refreshVersions/setup/#if-you-use-groovy-dsl-ie-buildgradle-files-not-kts
@jmfayard Did you skip my last comment about why I re-opened this issue?
Seen it now.
I think it's best for this kind of issues to document it better first. More code is not the solution to all problems, and it can be done later.
Added it in https://github.com/jmfayard/refreshVersions/wiki/Troubleshooting
See https://github.com/jmfayard/refreshVersions/issues/609
#609 doesn't really seem compatible with the issues we talked about in the last comments.
Re-opening again so we don't forget, because better late than never.