Skip to content Skip to sidebar Skip to footer

Android Gradle Error: Can't Register Given Path Of Type 'source' Because It's Out Of Content Root

I've just updated my Android Studio this morning to version 0.4.2 with gradle 1.9. Before updating Gradle was compiling well however, after updating it has started to show an error

Solution 1:

This same issue has been plaguing me for 2 days, ever since I upgraded to AS 0.4.2. I searched everywhere for a solution, including the open bug Scott Barta mentioned. For me the issue seemed to be in my root-level build.gradle file (the one that sits next to settings.gradle).

Check this build.gradle file, and if you have the following line of code in there comment it out and try to sync again with AS. The line of code is:

apply plugin: 'java'

I'm not sure why I personally had this in there, but I suspect it was because I based my gradle setup on example code. Likely the same example code you may have based yours on. Anyways, this was the fix for me. Hope it works for you too.

Post a Comment for "Android Gradle Error: Can't Register Given Path Of Type 'source' Because It's Out Of Content Root"