# multi-module:Project with path '' could not be found in project

**URL:** <https://discuss.gradle.org/t/multi-module-project-with-path-could-not-be-found-in-project/30004>\
**Category:** Help/Discuss\
**Created:** [December 29, 2018, 8:49am UTC](https://discuss.gradle.org/t/multi-module-project-with-path-could-not-be-found-in-project/30004 "2018-12-29T08:49:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenaky](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@kenaky](https://discuss.gradle.org/u/kenaky)\
**Post date:** [December 29, 2018, 8:49am UTC](https://discuss.gradle.org/t/multi-module-project-with-path-could-not-be-found-in-project/30004/1 "2018-12-29T08:49:14Z")

</div>

i’m using gradle to build some projects.There are two top projects,one is “test1”，another is “test2”.“test1” has three modules:“module1”,“module2”,“module3”.Here is project layout for “test1” and “test2”:

> Project test1  
> |——module1  
> &nbsp;&nbsp;&nbsp;&nbsp;|——build.gradle  
> |——module2  
> &nbsp;&nbsp;&nbsp;&nbsp;|——build.gradle  
> |——module3  
> &nbsp;&nbsp;&nbsp;&nbsp;|——build.gradle  
> |——settings.gradle  
> |——build.gradle

> Project test2  
> |——settings.gradle  
> |——build.gradle

The “settings.gradle” file in project “test1” is:

> rootProject.name=‘test1’  
> include ‘module1’  
> include ‘module2’  
> include ‘module3’

In project ‘test1’,“module 2” depends on “module1”. The build.gradle file of “module2” is:

> dependencies {  
> &nbsp;&nbsp;&nbsp;&nbsp;compile project(‘:module1’)  
> }

Project “test2” depends on “module2” in project “test1”,so I edit the “settings.gradle” file in project “test2” like this:

> rootProject.name=‘test2’  
> includeFlat ‘test1’  
> include ‘test1:module2’

when I excute the gradle build,i have the following error:

> Project with path ‘:module1’ could not be found in project ‘:test1:module2’.

I don’t know what is wrong.As the error show,gradle seems to regard “module1” as the sub module of “module2”.Is there suggest how to solve this problem?

---

<div class="post-metadata">

**Author:** ![iurysza](https://avatars.discourse-cdn.com/v4/letter/i/c6cbf5/32.png) [@iurysza](https://discuss.gradle.org/u/iurysza)\
**Post date:** [December 7, 2021, 7:58pm UTC](https://discuss.gradle.org/t/multi-module-project-with-path-could-not-be-found-in-project/30004/2 "2021-12-07T19:58:35Z")

</div>

Same issue, can anyone help? 😢

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [December 8, 2021, 12:29am UTC](https://discuss.gradle.org/t/multi-module-project-with-path-could-not-be-found-in-project/30004/3 "2021-12-08T00:29:41Z")

</div>

OPs problem is, that he is using `include` in a very bad way. `test2` includes a project of another multi-project build which is not a good idea. And of course as its dependency project is not also included (this is not the solution) it is missing. Instead the whole build `test1` should have been included as composite build using `includeBuild` and the dependency declared with the coordinates.
