Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Error: Project with path ''could not be found in root project ''

Check out the link for the project structure image.

RootModule
  --- ChildModule1
  --- ChildModule2
  --- ChildModule3

ChildModule3 depends on ChildModule2 depends on ChildModule1

Each settings.gradle defines

include ':PreviousModule'

project(':PreviousModule').projectDir = new File(settingsDir, '../PreviousModule')

And build.gradle contains

implementation project(':PreviousModule')

I even tried

compile project(':PreviousModule') 

but no help.

Project Structure Image

like image 224
Antriksh Parmar Avatar asked Mar 06 '23 07:03

Antriksh Parmar


1 Answers

If you want to continue setting it up as a multi-module project, you would want only one settings.gradle and that would be inside the root project. Please remove others as they are unnecessary

RootModule -> settings.gradle

include "ChildModule1" include "ChildeModule2" //... then in ChildModule2 -> build.gradle

dependencies { compile project('ChildModule1') }

like image 114
msuper Avatar answered Mar 07 '23 23:03

msuper