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

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

问题描述

我想切换到IntelliJ进行伪造(minecraft).当我按照他们在互联网上说的去做时,我遇到了一个错误:

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(默认)上运行,请尝试不超过750-1024m的-Xmx值,否则可能

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.

还有一个

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天全站免登陆