I have just upgraded (i.e., installed a full new version) my Android Studio from 1.5 to 2.0. The upgrade seemed to go smoothly, but I am having trouble with my project when
I faced the same issue. Make sure that you have made an entry in path in environment variable for gradle
C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin
After disable offline mode and setting the path in environment variables, the issue was fixed and Gradle was build cleanly.