IntelliJ and Android Gradle dependencies - unable to find module

前端 未结 4 2043
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 21:12

I have following directory structure:

D:\\PROJECT  
+---javaGradleProject1  
+---javaGradleProject2  
+---javaGradleProject3  
\\---AndroidProject  
    |          


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 22:01

    Add a colon (:) before the names of your modules when you add it in settings.gradle, e.g. for the first one, change this:

    include 'javaGradleProject1'
    project(':javaGradleProject1').projectDir = new File(rootDir, '../javaGradleProject1')
    

    to this:

    include ':javaGradleProject1'
    project(':javaGradleProject1').projectDir = new File(rootDir, '../javaGradleProject1')
    

    Now in addition to compiling, IntelliJ / Android Studio should give you code completion.

提交回复
热议问题