Error When Generating Signed Apk in Android Studio 3.2.1

This morning i was trying to generate signed apk for my play store developer console but failed then i found the message that show "Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.12): No cached version available for offline mode".

So here is how i solved it. Just go to setting of your android studio from the gradle setting just uncheck offline option now rebuild your project and try again to generate sign apk. Its done and working perfect.

Thank you for coming to tutorial ever. A small knowledge sharing platform.