简体   繁体   English

IntelliJ Idea完成错误

[英]IntelliJ Idea Completion Error

I am new to Idea IDE. 我是Idea IDE的新手。 After installed it for a few days, I was fascinated with its outstanding features. 安装几天后,我对它的出色功能着迷。

However, while I was actually writing code yesterday. 但是,昨天我实际上在编写代码。 I discovered that when the auto completion popped out, it showed nothing about the method of the object , merely some basic template say sync() var() ..... etc. 我发现自动完成弹出时,它没有显示任何有关对象方法的信息,仅显示了一些基本模板,例如sync()var().....等。

I have tried to setup the environment (Check the power save ...etc), but those previous solution seems to be for those whose auto-completion is turned off . 我曾尝试设置环境(检查节电...等),但先前的解决方案似乎是针对那些自动完成功能已关闭的解决方案。 Is there a way to fix it ? 有办法解决吗?

THANKS IN ADVANCE!! 提前致谢!!

When you have create your project, you might not have marked it as a Java project and provide a SDK. 创建项目后,可能未将其标记为Java项目并提供了SDK。 You can check it in File -> Project Settings -> Project -> Project SDK. 您可以在文件->项目设置->项目->项目SDK中进行检查。 If not, you can download the JDK on the Oracle site http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html You can also try to write a 如果没有,您可以从Oracle网站http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html下载JDK 您也可以尝试编写一个

public static void main(String... args) {
    System.out.println("It works !");
}

and write click on the "main" word. 并点击“主要”一词。 You should have a "Run 'Main'" option. 您应该有一个“运行'主要'”选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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