IntelliJ Errors with Startup and Compilation

已回答

I'm not sure how best to describe my problems, so I'll just list the errors I'm seeing and the steps I've taken to try to solve this. These errors started on my desktop a little while ago, and just recently they're starting to occur on my laptop as well. I'm using Windows 10 on both, with the latest version (2018.1.1) of IDEA Ultimate. The issues are:

  • Every time I startup IntelliJ or open a project, I have to reopen the Project tool window (not a big deal, but it would always be open before these errors began)
  • Every time I startup/open a project, the project SDK is unset, so I have to go into the project management window and specify the JDK
  • Every time I startup/open a project, the project has no modules, so I have to manually import the project module
  • Trying to compile with certain packages gives me a "java: package.name does not exist" error; this happens consistently with Maven imports, even though the editor itself shows no errors and I can ctrl+click class names to go to the source code, and it also happens on seemingly random Java standard lib imports, e.g. it occurs with "javafx.collections" but not "java.awt" or "java.util"

The first three bullets are really just symptoms, but the last one, the compilation errors, is making IntelliJ essentially unusable. In terms of other JetBrains IDEs I have, CLion and Rider, work fine, PyCharm does give me a similar error where SDK isn't found on startup every time, but once I set it everything works fine. I've tried the following steps towards a solution, with none of them working:

  • Maven re-imports (initially I thought the issue was just with Maven projects before I started seeing the other symptoms)
  • Invalidate Caches/Restart
  • Delete user config
  • Create a new project (trying to see if my current project files somehow all got messed up, but the problems persist even with new projects)
  • Uninstall + Reinstall
  • Uninstall, delete as many local files as I can find (in Program Files, Program Files (x86), dot folders in my user folder, folders in AppData) + Reinstall
  • I've reinstalled both through Toolbox, and by downloading the installer from the JetBrains website, both with the same results

I'm not really sure what to try next. I tried to wipe all traces of IntelliJ from my computer, save for the IntelliJ project files in all my projects, but that didn't work; are there other files IntelliJ uses that aren't in IntelliJ IDEA folders? What should I try next?

1

Where do you store your project configuration files? Do you use any sharing services (Dropbox, Google Driver, OneDrive)? Make sure the configuration files are not modified externally between project re-opens.

0
Avatar
Permanently deleted user

My project files (.iml files) are all stored in the root of the project folder. I do use OneDrive to keep files updated between my desktop and laptop, though I didn't think this was the issue since everything was working on my laptop, just not my desktop, for a while. As far as external modification goes, I certainly never touch the project config files, and my IntelliJ versions are the same on both computers, so I'm not sure if IntelliJ is modifying them while I work on a project on my laptop in a way that somehow breaks it for my desktop, or vice versa. Taking a quick look at the files themselves, nothing seems out of sorts, but I could be missing something.

1

I am also experiencing the same thing - it happened just after I upgraded.

0

>I do use OneDrive to keep files updated between my desktop and laptop

OneDrive synchronization may cause such issues, see https://youtrack.jetbrains.com/issue/IDEABKL-7619 Try workaround, mentioned in the issue. See also https://stackoverflow.com/a/49711909/2000323

1
Avatar
Permanently deleted user

That was exactly the issue, thank you so much! Turns out OneDrive turned on On-demand files for my desktop but not my laptop, so that's why I was only seeing errors on my desktop for a bit.

0

请先登录再写评论。