Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning:No JDK specified for module 'Myproject'.when run my project in Android studio

When I run my project, I found the module in error then I click in founding an error "Warning:No JDK specified for module 'Myproject'.when run my project.",vI setting JAVA_HOME and JDK_HOME in my path. hope Anyone can share your idea?

like image 430
Chunsheng Wei Avatar asked May 09 '15 10:05

Chunsheng Wei


3 Answers

it happened for me when I deleted the jdk and installed new one somehow the project kept seeing the old one as invalid but couldn't change, so right click on your module -> Open Module Settings -> and choose Compile Sdk Version.

like image 176
nosaiba darwish Avatar answered Nov 18 '22 12:11

nosaiba darwish


Go to File->Project Structure->SDK Location and check if the path for SDK and JDK location specified by you is correct. If its not then set the correct path. Then It will work.

like image 45
Rushikesh Avatar answered Nov 18 '22 10:11

Rushikesh


Run -> Edit configurations -> Select your build configuration -> JRE - change Default to one of actual JDK paths

like image 15
Max Elkin Avatar answered Nov 18 '22 10:11

Max Elkin