无法在Intellij中设置项目SDK [英] Unable to set project SDK in Intellij

查看:1824
本文介绍了无法在Intellij中设置项目SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前使用Java 1.7运行我的项目,但现在我必须将其升级到1.8版。我把它作为替换安装安装在我的CentOS上。
Java8的位置在 /opt/jdk1.8.0_25 / ,当前的Java是 /usr/java/jdk1.7.0_67 / 。我的系统的 JAVA_HOME 也指向 /usr/java/jdk1.7.0_67 /


我添加新SDK时出现此错误:无法保存设置:请指定其他SDK名称

I was earlier running my project using Java 1.7 but now I have to upgrade it to version 1.8. I have it installed as an alternative installation on my CentOS.
The location of Java8 is at /opt/jdk1.8.0_25/ and the current Java is at /usr/java/jdk1.7.0_67/. My system's JAVA_HOME also points to /usr/java/jdk1.7.0_67/.

As soon as I add the new SDK I get this error: Cannot Save Settings: Please specify a different SDK name.

我该如何解决这个问题?

How should I solve this issue?

推荐答案

这意味着你已经拥有一个具有此名称的SDK(导致jetbrains中的密钥是: sdk.list.unique.name.required.error )。

This means you already have a SDK with this name (cause the messge key in jetbrains is : sdk.list.unique.name.required.error).

删除SDK再次创建之前。

Remove the SDK before creating it once again.


  1. 打开项目结构对话框(例如Ctrl + Shift + Alt + S)。

  2. 在左侧窗格的平台设置下,单击SDK。

  3. 要添加新SDK,请单击添加并选择所需的SDK类型。

  4. 在打开的对话框中,选择SDK主目录,然后单击确定。
    结果,一个新的SDK被添加到IntelliJ IDEA,其设置显示在对话框右侧的SDK页面上。

  5. 可选,编辑SDK名称和内容。

  6. 如有必要,如上所述添加更多SDK。

  7. 在项目结构对话框中单击确定。

  1. Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
  2. In the left-hand pane, under Platform Settings, click SDKs.
  3. To add a new SDK, click add and select the desired SDK type.
  4. In the dialog that opens, select the SDK home directory and click OK. As a result, a new SDK is added to IntelliJ IDEA, and its settings are shown on the SDK page in the right-hand part of the dialog.
  5. Optionally, edit the SDK name and contents.
  6. If necessary, add more SDKs as described above.
  7. Click OK in the Project Structure dialog.



配置项目SDK



To configure a project SDK


  1. 打开项目结构对话框(例如Ctrl + Shift + Alt + S)。

  2. 在左侧窗格的项目设置下,单击项目。

  3. 在在对话框右侧打开的页面,从Project SDK列表中选择所需的SDK。

  4. 如果列表中没有所需的SDK,请单击New并选择必要的SDK类型。

  5. 在打开的对话框中,选择SDK主目录,然后单击确定。
    因此,新的SDK将添加到IntelliJ IDEA并选择作为项目SDK。

  6. 要查看或编辑SDK名称和内容,请单击编辑。 (SDK页面将打开。)

  7. 在项目结构对话框中单击确定。

  1. Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
  2. In the left-hand pane, under Project Settings, click Project.
  3. On the page that opens in the right-hand part of the dialog, select the necessary SDK from the Project SDK list.
  4. If the desired SDK is not present in the list, click New and select the necessary SDK type.
  5. In the dialog that opens, select the SDK home directory and click OK. As a result, a new SDK is added to IntelliJ IDEA and selected as the project SDK.
  6. To view or edit the SDK name and contents, click Edit. (The SDK page will open.)
  7. Click OK in the Project Structure dialog.

来源: IntelliJ IDEA 14.1.1帮助/配置全局,项目和模块SDK

这篇关于无法在Intellij中设置项目SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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