简体   繁体   English

无法保存设置:IntelliJ IDEA

[英]Unable to save settings : IntelliJ IDEA

I use IntelliJ IDEA 15 and have a problem with the auto-saving.我使用 IntelliJ IDEA 15 并且在自动保存时遇到问题。 For example I make a new configuration, eg Show the line number.例如我做了一个新的配置,例如显示行号。 When I close IntelliJ and reopen my IDE, it doesn't save my configuration and shows me this message:当我关闭 IntelliJ 并重新打开我的 IDE 时,它不会保存我的配置并向我显示以下消息:

Unable to save settings : Failed to save settings .无法保存设置:无法保存设置。 Please restart IntelliJ IDEA请重启 IntelliJ IDEA

I get this too (IntelliJ 15.0.5), but only when the "Markdown support" plugin is used.我也得到了这个(IntelliJ 15.0.5),但仅当使用“Markdown support”插件时。 Once a .md file is visualised the error starts appearing.一旦 .md 文件被可视化,错误就会开始出现。

For future reference current version: 2016.1.20160405.143供以后参考当前版本:2016.1.20160405.143

Not a very solution-oriented post, but maybe this can help someone further pinpoint the source of the error.不是一个非常面向解决方案的帖子,但也许这可以帮助某人进一步查明错误的来源。

This workaround allows you continue using "Markdown Support".此解决方法允许您继续使用“Markdown 支持”。

Uninstall the latest version of "Markdown Support" and install version "8.0.0.20160127.143.1" from https://plugins.jetbrains.com/plugin/7793?pr=idea .卸载最新版本的“Markdown Support”并从https://plugins.jetbrains.com/plugin/7793?pr=idea安装版本“8.0.0.20160127.143.1”。 Everything works fine.一切正常。

I was receiving the error with:我收到以下错误:

  • IntelliJ v15.0.6 IntelliJ v15.0.6
  • "Markdown support" plugin version 2016.1.20160405.143 《Markdown 支持》插件版本 2016.1.20160405.143

I uninstalled the Markdown support plugin ( IntelliJ IDEA > Preferences... > Plugins > Markdown support), restarted IntelliJ , and am now able to save without error.我卸载了 Markdown 支持插件( IntelliJ IDEA > Preferences... > Plugins > Markdown support),重新启动了IntelliJ ,现在可以IntelliJ地保存。

I have tried everything from this SO thread but it did not worked.我已经尝试了这个 SO 线程中的所有内容,但没有奏效。 I solved it while I deleted the .idea folder from my project's windows path and then I restarted intellij.我在从项目的 Windows 路径中删除.idea文件夹时解决了它,然后我重新启动了 intellij。

I delete this file : .IntelliJIdea我删除了这个文件: .IntelliJIdea
When I launch ./idea I should reconfigure all IntelliJ system (config/ extention/ theme/ licence ...)当我启动 ./idea 时,我应该重新配置所有 IntelliJ 系统(配置/扩展/主题/许可证...)
So It's okay now but I think is not a good solution ...所以现在可以了,但我认为这不是一个好的解决方案......

This can also happen when the disk drive where the currently opened project is stored is full (0 bytes left on device).当存储当前打开的项目的磁盘驱动器已满(设备上剩余 0 个字节)时,也会发生这种情况。 The system tries to write to the .idea folder but cannot, so it gives the same error as if there were no access rights.系统尝试写入 .idea 文件夹但无法写入,因此它给出了与没有访问权限相同的错误。

This happened to me as there was a process writing to disk in the background until it was full.这发生在我身上,因为有一个进程在后台写入磁盘直到磁盘已满。

Workaround for Windows users. Windows 用户的解决方法。 My installation is located in:我的安装位于:

"C:\\Program Files\\JetBrains\\phpstorm" “C:\\Program Files\\JetBrains\\phpstorm”

The location gives it problems with the saving of files.该位置给它保存文件带来了问题。 (probably to do with user rights and UAC, not totally figured out what rights the folder needs, but for easy resolving I removed and reinstalled Phpstorm to (可能与用户权限和 UAC 有关,并没有完全弄清楚文件夹需要什么权限,但为了便于解决,我删除并重新安装了 Phpstorm

"C:\\development\\phpstorm" and it resolved the issue. “C:\\development\\phpstorm” ,它解决了这个问题。

On OSX, I've uninstalled PhpStorm, and then have installed it again, always by using the JetBrains TOOLBOX.在 OSX 上,我卸载了 PhpStorm,然后再次安装它,始终使用 JetBrains TOOLBOX。

Hope it helps!希望有帮助!

Windows Defender was the issue Windows Defender 是问题所在

Windows defender has a protection component called ransomware protection (details: https://www.makeuseof.com/tag/protect-ransomware-windows-defender/ ) Windows Defender 有一个名为勒索软件保护的保护组件(详细信息: https : //www.makeuseof.com/tag/protect-ransomware-windows-defender/

This restricts folder access (for selected folders) to some programs only.这将文件夹访问(对于选定文件夹)限制为仅某些程序。

Add Webstorm to allowed applications将 Webstorm 添加到允许的应用程序

Excerpt is below.摘录如下。 Full guide with pictures are here: https://www.windowscentral.com/how-allow-blocked-apps-ransomware-protection-windows-10-october-2018-update带图片的完整指南在这里: https : //www.windowscentral.com/how-allow-blocked-apps-ransomware-protection-windows-10-october-2018-update

  1. Open Windows Security.打开 Windows 安全。
  2. Click on Virus & threat protection.单击病毒和威胁防护。
  3. Under "Ransomware protection," click the Manage ransomware protection option.在“勒索软件防护”下,单击管理勒索软件防护选项。
  4. Click the Allow an app through Controlled folder access option.单击允许应用程序通过受控文件夹访问选项。
  5. Click the Add an allowed app button.单击添加允许的应用程序按钮。
  6. Click the Recently blocked apps option.单击最近阻止的应用程序选项。
  7. Click the + (plus) button for the app you trust and want to allow.单击您信任并希望允许的应用程序的 +(加号)按钮。
  8. Click the Close button.单击关闭按钮。

For those who have a simular issue on windows machines:对于那些在 Windows 机器上有类似问题的人:

I have applied the "hidden" property for the .[IntelliJ-Produkt][Version] folder in Users/[Username] folder.我已经为 Users/[Username] 文件夹中的 .[IntelliJ-Produkt][Version] 文件夹应用了“隐藏”属性。 This was causing the issue.这导致了这个问题。 Don't do that.不要那样做。

I faced the same issue today and it might help some people if above solutions cant help.我今天遇到了同样的问题,如果上述解决方案无济于事,它可能会对某些人有所帮助。 I am using dual boot system.我正在使用双引导系统。 Win 8 and Kubuntu.赢 8 和 Kubuntu。 I got this problem with my intellij installed in Kubuntu.我在 Kubuntu 中安装的 intellij 遇到了这个问题。 I realized my project was in a NTFS partition which was marked as READ ONLY.我意识到我的项目位于标记为只读的 NTFS 分区中。 This happens sometimes when you shutdown windows and start computer into your linux.当您关闭 Windows 并在您的 linux 中启动计算机时,有时会发生这种情况。

Solution is to go back to your windows OS and restart it and switch to linux.解决方案是返回到您的 Windows 操作系统并restart它并切换到 linux。 Also, you could hold shift and press shutdown button, then choose to turn of your pc in the blue menu.此外,您可以按住shift键并按关机按钮,然后在蓝色菜单中选择turn of your pc

I encountered this problem when I open up IDEA for the first time after copying the old config files backed up with my Live CD USB before reinstalling my Ubuntu.在重新安装我的 Ubuntu 之前,我在复制了用我的 Live CD USB 备份的旧配置文件后第一次打开 IDEA 时遇到了这个问题。 I think it is because I copied the files from the old OS and to the new OS as root, so the ownership of the folder is changed.我认为这是因为我将文件从旧操作系统复制到新操作系统,因此文件夹的所有权发生了变化。 Now when I want to write to it as another user, it blocks me from doing it.现在,当我想以另一个用户的身份写信给它时,它会阻止我这样做。

Change the ownership to your user and change permission to add write solves it.将所有权更改为您的用户并更改添加写入的权限可以解决它。 You use chown and chmod .您使用chownchmod

I got same error message for InteliJ WebStrorm saying我收到 InteliJ WebStrorm 的相同错误消息说

Unable to save settings Failed to save settings.无法保存设置 无法保存设置。 Please restart WebStorm请重新启动 WebStorm

It happened due to permission issue.这是由于权限问题而发生的。 if you don't have permission to save this message could pop-up.如果您无权保存此消息,则可能会弹出。 Please make sure you have write permission to the folder you are saving.请确保您对要保存的文件夹具有写入权限。

On windows 10 I had the same problem, I ran PhpStorm as administrator which fixed permission issues it had.在 Windows 10 上,我遇到了同样的问题,我以管理员身份运行 PhpStorm,修复了它的权限问题。 Then I restarted PhpStorm without administrator permissions and everything worked fine.然后我在没有管理员权限的情况下重新启动了 PhpStorm,一切正常。

It was a fresh install so no plugins other then the build in ones.这是一个全新的安装,所以除了内置插件之外没有其他插件。

I've encountered this issue multiple times;我多次遇到这个问题; rebooting my (windows) computer has always worked for me (while restarting Intellij didn't do anything).重新启动我的(Windows)计算机一直对我有用(而重新启动 Intellij 没有做任何事情)。

It's because you don't have permission to save settings.这是因为您没有保存设置的权限。 On my macOS, I set write permission of my project.在我的 macOS 上,我设置了我的项目的写权限。

I might be late at answering this but I did not see any accepted answers here.我可能会迟到回答这个问题,但我在这里没有看到任何被接受的答案。

I got a solution to this on other forum.我在其他论坛上得到了解决方案。

They suggested to start IntelliJ IDEA as Administrator .他们建议以管理员身份启动 IntelliJ IDEA

It worked for me.它对我有用。

Hope it helps people who come here searching for answers.希望它可以帮助来这里寻找答案的人。

for my Ubuntu, i fixed it by issuing this command.对于我的 Ubuntu,我通过发出此命令修复了它。 sudo chmod 777 /path/to/dir须藤 chmod 777 /path/to/dir

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

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