While trying to build my Application on Android Studio 2.1 (On Ubuntu 16.04), it gets stuck on the below note:
Executing tasks: [:app:generateDebugSources,
You're probably behind the proxy, you might have recently changed your password or something has changed. Go to
/home//.gradle/ (Linux)
/Users//.gradle/ (Mac)
C:\Users\\.gradle (Windows)
in gradle.properties file, delete/ change proxy settings. They are different to your android studio proxy settings.
Had the same issue, gradle used to take an hour to build. After I deleted proxy settings from gragle.properties file, it now takes couple seconds.