Android gradle error: unable to register the specified path of type "SOURCE", because it does not match the root of the content

I just updated my Android Studio this morning to version 0.4.2 using gradle 1.9. However, there was a compilation before the gradle upgrade, but after the upgrade, it started showing an error every time I tried to compile or update the gradle configurations. The message is always the same:

"Can't register given path of type 'SOURCE' because it out of content root."
Content root: 'C:/Users/XXX/Documents/AndroidWork/Project/modules'
Given path: 'C:\Users\XXX\Documents\AndroidWork\Project\src\testLive\java'

My folder structure:

/Project

- | modules /

     
  

- | Modulea

         

- | moduleB

  
  

- | CSI /

     
  

-main /

         
    
      

-java

                 

-res

                 

-AndroidManifest

      
  
       

-dev /

         
    
      

-java

                 

-res

                 

-AndroidManifest

      
  
       

-qa /

         
    
      

-java

                 

-res

                 

-AndroidManifest

      
  
       

-live /

         
    
      

-java

                 

-res

                 

-AndroidManifest

      
  

- | build.gradle

- | settings.gradle → here I added information about the modules [include ': modules: moduleA', ': modules: moduleB']

when dev, qa and live are different tastes.

- , gradle "testLive", .

- ?

, .

+4
1

2 , AS 0.4.2. , , . , , build.gradle root (, settings.gradle).

build.gradle, AS. :

apply plugin: 'java'

, , , , gradle . , , . , . , .

0

All Articles