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

前端 未结 11 1931
故里飘歌
故里飘歌 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:51

    I was able to fix it using the answer here: https://stackoverflow.com/a/32176571/1174024 But I have 150 modules. So I would have had to perform this step 150 times.

    So I needed to do it a different way.

    So first close the existing project, then Import it again, In the first step of the wizard choose "Gradle" project. Then the next step of the wizard has the Gradle project properties. Here it's going to ask you for, among other things, the Java SDK to use. The default will be "Project SDK". Do not use this default, instead hand pick your Java SDK from the list. Then finish the import.

    Now the problem should go away.

提交回复
热议问题