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

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

Project test2

The “settings.gradle” file in project “test1” is:‘test1’
include ‘module1’
include ‘module2’
include ‘module3’

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

dependencies {
    compile project(’:module1’)

Project “test2” depends on “module2” in project “test1”,so I edit the “settings.gradle” file in project “test2” like this:‘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?