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

前端 未结 11 1876
故里飘歌
故里飘歌 2021-02-02 07:10

When I run my project, I found module is error then I click in found a error \"Warning:No JDK specified for module \'Myproject\'.when run my project.\",vI sett

相关标签:
11条回答
  • 2021-02-02 07:55

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

    0 讨论(0)
  • 2021-02-02 07:55

    In Linux I've resolved this by deleting all the folders with names starting as ".AndroidStudio" in my home directory and then rerunning the Android Studio.

    0 讨论(0)
  • 2021-02-02 07:57

    ReImport the dependencies if it is a maven project

    0 讨论(0)
  • 2021-02-02 07:59

    Restart IntelliJ and reimport the Project and import it as maven. It should work then. The error occurs because IntelliJ keeps track of module through .iml files so any changes in these files can cause this error. Reimporting the project regenerates the .iml file so generally, it solves the error.

    0 讨论(0)
  • 2021-02-02 08:02

    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.

    0 讨论(0)
提交回复
热议问题