I installed Android Studio but it was giving me error that I need to install JDK but JDK was already installed. Then I realized it is asking to install 64bit version of JDK.
I tried everything I could but it didn't help. So I reinstalled Windows and installed Android Studio and now everything works.
And the irony is, there is no JAVA_HOME or JDK_HOME variable defined but it still works.