简体   繁体   中英

Cannot access io.micronaut in intellij

I just wanna share a solution to a problem that I had and cost me 2 hours to solve.

I'm using micronaut 1.3.3 with intellij, and after follow the official guide to create a new app, i had the problem in the Main method saying that the Micronaut.run(Application.class) has a problem, "cannot access Micronaut".

After a few hours i discovered that the gradlew downloaded the "micronaut-runtime" dependency but not injected in the intellij project, so it's necessary to go in "Project Structure" > Modules > Name of Project > Main (in case of have another main out of your project folder just remove it and will work) > in the right panel click in the plus signal in dependencies column > library > find the folder of you micronaut-runtime (you can find easily just pressing ctrl+click in the Micronaut call in Main Method and getting the local address). With this, your problem should be resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM