“设置..."和“设置..."有什么区别?和“默认设置..."在 Android Studio 中? [英] What is the difference between "Settings..." and "Default Settings..." in Android Studio?

查看:27
本文介绍了“设置..."和“设置..."有什么区别?和“默认设置..."在 Android Studio 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我可以在 File | 中设置文件编码和其他参数设置...,还有File |其他设置 |默认设置....但是,我不清楚这两个选项之间的区别是什么.

此外,我可以运行File |Export Settings... 将设置保存到 settings.jar 文件,但是我不清楚如果我运行 File |导入设置...操作.

  • 这两个设置选项有什么区别?
  • 运行导出/导入时要导出/导入哪些设置?

解决方案

Android Studio 中的设置与 IntelliJ IDE 中的设置方式相同,如 (模板项目的设置).

因此,如果刚刚创建了一个新项目,则默认设置和设置将相同.

请注意,对话框中的设置标记为模板项目设置",并包含与上面设置中的我的应用程序"相同的子标题:

导出和导入设置

设置可以导出 到 JAR 文件,这样它们可能是 导入 稍后.

导出

在导入和导出时,可以选择一个或多个组件进行导入或导出.默认项目设置(可从File | 其他设置 | 默认设置...) 是可用于导出/导入的选项之一.在下面的对话框中,仅选择了要导出的默认项目设置:

导入

When an exported JAR settings file is selected for import, in the "Select Components to Import" dialog, only options that were originally exported are available for re-import.在这种情况下,仅导出了默认项目设置,因此这是重新导入文件时唯一选择的选项:

I find I can set File Encodings and other parameters in both File | Settings..., and also File | Other Settings | Default Settings.... However, I'm not clear on what the difference between these two options is.

Further, I can run File | Export Settings... to save settings to a settings.jar file, however I am unclear what is restored if I run the File | Import Settings... operation.

  • What is the difference between the two settings options?
  • What settings are being exported/imported when running export/import?

解决方案

The settings in Android Studio work the same way as they do in the IntelliJ IDE, as Android Studio is based on IntelliJ.

Settings

File | Settings is used to define settings that apply for the current project, and also settings for the IDE (i.e. not related to, or saved with, a project).

In the Settings dialog, settings are grouped into (1) "Project Settings" for the current project (which may change when a new project is loaded), and (2) IDE Settings which are not specific to the current project:

Default Settings

File | Other Settings | Default Settings... apply only for new projects (the template project's settings).

Thus if a new project has just been created, then Default Settings and Settings would be the same.

Note in the dialog that the settings are labelled "Template Project Settings", and include the same sub-headings as those for "My Application" from Settings, above:

Exporting and Importing Settings

Settings may be exported to a JAR file, such that they may be imported later.

Exporting

When importing and exporting, one or more components may be selected to import or export. Default Project Settings (those accessible from File | Other Settings | Default Settings...) is one of the options available for export/import. In the dialog below, only Default Project Settings are selected for export:

Importing

When an exported JAR settings file is selected for import, in the "Select Components to Import" dialog, only options that were originally exported are available for re-import. In this case, only Default project settings were exported, and thus this is the only option to select when re-importing the file:

这篇关于“设置..."和“设置..."有什么区别?和“默认设置..."在 Android Studio 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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