How To Solve Android Studio Gradle Build Failure

I was trying to make an app On Android Studio. During the making of the app on Android studio, it gives an error. The error was about the Gradle bundle failing.

I neglected this error while creating. I thought this might be due to the slow process and net speed. But after some time, when I pushed the tab for the final step, the pop-up appears that the generate the app failed. It took almost 2 hours to do.

Is there any senior app developer who can help me out in solving this irritating problem?