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,
Adding more to @SkyWalker's answer:
Also check if you have the latest version of gradle. Updating gradle plug-in to the latest version could help.
Note: I have a similar setup(Android Studio 2.1 on Ubuntu 16.04), and I had a similar problem. Updating gradle to the latest version solved the problem for me.