Getting Gradle dependencies in IntelliJ IDEA using Gradle build

前端 未结 7 1184
一个人的身影
一个人的身影 2021-01-29 20:46

Grade build, even from inside IntelliJ IDEA does not put the dependencies into the \"External Libraries\" folder, so these classes don\'t show up as suggestions in the editor an

7条回答
  •  猫巷女王i
    2021-01-29 21:32

    You either need to import the project as a Gradle project from within Idea. When you add a dependency you need to open the Gradle window and perform a refresh.

    Alternatively generate the project files from gradle with this:

    build.gradle:

    apply plugin: 'idea'
    

    And then run:

    $ gradle idea
    

    If you modify the dependencies you will need to rerun the above again.

提交回复
热议问题