Intellij IDEA Maven 导入问题 [英] Intellij IDEA Maven Import problems

查看:62
本文介绍了Intellij IDEA Maven 导入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想切换到 IntelliJ 进行锻造模组(我的世界).当我按照他们在互联网上说的去做时,我收到了一个 Maven 错误...

I wanted to switch to IntelliJ for forge modding (minecraft). When I do what they are saying to do on internet, I get a maven error...

            Unindexed remote maven repositories found. Disable...
            The following repositories used in your gradle projects were not indexed yet: 
            http://files.minecraftforge.net/maven
            If you want to use dependency completion for these repositories artifacts,
            Open Repositories List, select required repositories and press "Update" button

当我点击更新时,它加载了半秒钟,然后再次出现相同的错误...我在互联网上搜索,似乎没有人遇到我的问题...请帮忙?

When I click update, it loads for half a second and then gives the same error again... I searched on internet and nobody seems to have my problem... help please ?

推荐答案

检查 idea.log 用于错误.它可能会因 OutOfMemory 错误而失败,在这种情况下,您可以尝试增加 堆大小Maven 导入器(导入器的 VM 选项)和 IDE 堆大小.

Check idea.log for errors. It may fail with OutOfMemory error in which case you can try increasing the heap size for Maven Importer (VM options for importer) and IDE heap size.

如果您在 32 位 JVM 上运行(默认),-Xmx 值尽量不要超过 750-1024m,否则可能 崩溃或无法启动.

Try not to exceed 750-1024m for -Xmx value if you are running on a 32-bit JVM (default), otherwise it may crash or fail to start.

如果您需要使用更多堆,切换到 64 位 Java并在 IntelliJ IDEA 设置中为 Maven(导入器的 JDK)指定相同的 64 位 JVM.

If you need to use more heap, switch to 64-bit Java and specify the same 64-bit JVM for Maven (JDK for importer) in IntelliJ IDEA settings.

另一种可能的情况是 IDE 无法连接到 Maven 进程.在某些系统上,需要编辑 hosts 文件,以便 localhost 正确解析.

Another possible case is if IDE cannot connect to the Maven process. On some systems it's needed to edit the hosts file so that localhost resolves correctly.

还有一个 由 Nvidia 驱动程序引起的错误(Java 进程崩溃).如果这适用于您的硬件,请确保您拥有最新的驱动程序.

There was also a bug caused by Nvidia driver (java process was crashing). Make sure you have the latest driver if this applies to your hardware.

如果以上都没有帮助,请分享您的 idea.log 文件.

If all the above doesn't help, share your idea.log file.

请注意,使用项目不需要索引存储库,但它可能表明 Maven 由于上述原因之一(或其他原因)而无法工作.查看是否导入了项目的依赖项,是否可以在IDEA中构建导入的项目.

Note that indexing repositories is not required for working with a project, but it may indicate that Maven fails to work for one of the reasons above (or some other). See if the dependencies for the project were imported and if you can build the imported project in IDEA.

某些存储库根本无法编入索引,在这种情况下只需忽略错误.

Some repositories cannot be indexed at all, in this case just ignore the error.

这篇关于Intellij IDEA Maven 导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆