Can't locate import javax.inject.Inject package

前端 未结 5 1725
北海茫月
北海茫月 2020-12-15 04:11

I\'m trying to implement Dagger as a dependency injector in an IntelliJ project, but my code is failing on:

import javax.inject.Inject;

Int

5条回答
  •  情书的邮戳
    2020-12-15 04:59

    In case if anyone using plain Java project not Maven or Gradle or e.t.c. You can download a separate Jar file from here Inject Jar file

    and then add to your external libraries, in IDEA you can do that as follows: File -> Project Structure -> Libraries -> New Project Library (+)

    Then find the path to library and job is done.

提交回复
热议问题