Change project structure
You must change the jdk location in the project structure
Follow these steps
Switch to file -> project structure -> sdk location
Deselect Use embedded jdk(recommended)
Then change the jdk location to C)Program Files/java/jdk1.x.x_xxx
x JDK, .