[actual record of Android stepping on the pit] Android studio reports an error invalid gradle JDK configuration found after importing the project

Encountered this problem, as a result, no blog is the right way to deal with it

Error reporting reason

Mismatched configuration files are generated after directly opening the project or importing the project with an incorrect JDK path

Solution

Delete the file with the suffix “. IML” under the. Idea path, and then set the correct JDK path. A JDK is available in the Android studio directory. Then file – & gt; Sync project with gradle files, the IDE will regenerate a matching configuration file and solve the problem.

Read More: