For every other StackOverflow question that\'s been asked about this, here, here, and here, I\'ve followed all the steps to resolve this issue, and none have worked.
My problem was adding 2 path in JAVA_HOME variable (I had added x64 jdk path with x86 jdk and my android studio needed just the x86 one. I deleted the x64 path and it has just worked :)