Warning: JDK is not specified for the My Project module. When starting my project in android studio

When I start my project, I found that the module is an error, then I find that I found the error . "Warning: for the module" Myproject "there is no JDK when my project starts.", VI setting JAVA_HOME and JDK_HOME in my path. Hope Anyone can share your idea?

+6
source share
4 answers

this happened to me when I uninstalled jdk and installed a new one, because the project still saw the old one as invalid, but could not change, so right-click on its module → Open module settings → and select “Compile Sdk version” .

+8
source

Go to “File-> Project Structure-> SDK Location and check the path to determine the location of the SDK and JDK. If it does not set the correct path. Then it will work.

+3
source

On Linux, I solved this by deleting all folders with names starting with ".AndroidStudio" in my home directory, and then restarted Android Studio.

+1
source

Gradle sync fixed this issue for me.

0
source

Source: https://habr.com/ru/post/986861/


All Articles