Been Stuck on this too - and finally got mine working! The answer is essentially the hooking up of the JDK folder needs fixing …
But I tried hooking up the actual JDK.2.1.21312 folder - with still no success And it gave that error.
But after hooking up the the ANDROID STUDIO / JRE folder … mine worked. (Not Android Sdk/Jre - but Android Studio / Jre)
Although mine is on MAC - so i had to point deeper - into Contents / Home as well Not sure if on PC - just pointing to JRE might suffice (which i saw on some others tutorials)
But long story short - that error - represents - the hookup of the JDK - is still not good enough… and needs to be pointed ‘correctly’…
My settings above has (finally) worked for me. Hope that helps some peeps!