java.lang.NullPointerException (no error message)
If you are still having this problem, even after deleting .gradle folder under your project's path, as suggested above, kill all Java processes running on the task manager and try to update your Android Studio.
I was in the same situation but now it works fine.
Hope it helps!
I have same problem when the java version is 1.9
jenv use java 1.8
all problem is solved.
I've deleted .gradle folder from the project and was able to rebuild it again.
N.B: Make a backup, just in case.
This Problem created when the suddenly System restarted, then gradle file corrupted. and that corrupted file cached, so we need to Delete this file from your project
your_project_path/.gradle/2.14.1/taskArtifacts
It will be re-generate again.
Then restart the Android studio and re-compile the project.
source : https://code.google.com/p/android/issues/detail?id=220741#c13
It is worked for me.