Can't build to Android because of JDK installation

When I try to build to Android the “building player” window gets up to “post processing player” then displays a window that says “Unable to find suitable JDK installation”. I have already installed both the Android SDK and the latest Java JDK and it’s still getting that pop up window. What should I do?

Have you set up a virtual template in avd manager? Also have you at least downloaded the sdk’s via the sdk manager?

It’s been a while since there’s been any movement on this post, but in case anyone is interested I managed to fix the problem by editing my environment path variables and putting my reference to java at the beginning of the string. It seems there were a few versions of Java on my machine. Restarted unity,rebuilt and up it popped on my phone!

Create new Variable called JAVA and locate the path to it:
IN my case
C:\Program Files\Java\jdk1.7.0_45\bin