After I upgrade my gradle gradle-5.4.1 to gradle-6.3, I got an error like 'buildSrc' cannot be used as a project name as it is a reserved name. I'm using buidleSrc for Gradle Dependency Management(link). I dont know how to solve this issue please help on this.
3 Answers
tldr: Remove "buildSrc" from settings.gradle
/ settings.gradle.kts
. With gradle update, "buildSrc" is now reserved project name.
If you are looking an answer for Android, this should be helpful:
- Open your
settings.gradle
/settings.gradle.kts
- Remove "buildSrc" from included modules
- Rebuild
Example:
settings.gradle.kts
might look like this (syntax will be different for settings.gradle
)
include(":app")
rootProject.name = "yourapp"
include(":moduleA")
include(":buildSrc")
include(":moduleB")
include(":moduleC")
remove the line that includes "buildSrc" like:
include(":app")
rootProject.name = "yourapp"
include(":moduleA")
include(":moduleB")
include(":moduleC")
and rebuild project.

- 2,743
- 1
- 24
- 35
just remove include ':buildSrc' from the settings.gradle file and everything will go well.

- 399
- 4
- 11
This is a change introduced in Gradle 6.0 that made buildSrc
a reserved project name.
It means you have a reference to buildSrc
as a project in your settings.gradle(.kts)
.
The reference will look like:
include("buildSrc")
includeBuild("buildSrc")
I would recommend to start by removing that reference and see if it fixes the issue. If not, it means your project was wired differently and you simply have to rename it.

- 13,661
- 2
- 34
- 43
-
sorry, can you elaborate more. what reference I need to remove ?. – Magesh Pandian Apr 16 '20 at 11:44