You must change the jdk location in the project structure
Follow these steps
Go to file -> project structure -> sdk location
Deselect Use built-in jdk (recommended)
Then change the jdk location to C: \ Program Files \ java \ jdk1.8.0_101
Then click “OK” and wait for the assembly to complete.
source
share