Android Studio 3.3文件夹图标

Can*_*ato 9 intellij-idea android-studio

在新的Android Studio 3.3上,某些图标已更改,我希望了解每个按钮的含义。

这个这个答案已经过时了。

例如,在这张图片中,我的项目中有两个模块,但是一个模块带有一个绿点,另一个模块是条形图。这是什么意思?

在此处输入图片说明

Zoe*_*Zoe 12

There's two components to the tree: The background color/folder color, and additional icons. Beyond this, there's also the text color, but it's mainly used for VCS and is beyond the scope of the question. See this answer for VCS color meanings.

Because you're asking about folders in general in one part, icons in another, then two specifically in the last, I'm going to cover the various folder-based ones.

To start off, the exact colors depends on the color scheme, and in some cases plugins (there are a few plugins, for an instance the Material plugin, that entirely re-do the folders) that change these, but I'll be using a non-standard theme with the standard icons (TL;DR: different colors, same icons).

Important factors

Before I get started on the list itself, there are a few different factors that determine the icon:

  • Folder status (included/ignored)
  • Folder type
    • Module type (i.e. android, java library, etc)
    • General type (i.e. assets, resources, package, etc)
  • Source set (sources and tests) or hierarchical parent (I.e. test resources have a different icon from non-test resources)

In addition, there's file type, but those are out of the scope. Additionally, for the folder icons to be visible, the project needs to be successfully compiled. Failed compiling may result in AS/IntelliJ interpreting the folders differently, or even unregister source sets.

Additionally, it's worth noting that failed builds or re-building can, in some cases, change the folder icon to an incorrect (although related) one. In a recent module build on the test project, that the library module was unregistered, and the Android module was marked a Java module. This doesn't break anything though, but it's a good idea remembering this isn't always accurate.

The list

First off, we have the green dot:

在此处输入图片说明

This means it's an Android module.


There's also one with a coffee cup:

在此处输入图片说明

This can denote either a Java module, or the root for an Android project (because in that regard, the Android projects are considered Java projects too).


There's also some folders with the color blue. These note source roots. In the project view, you typically find java, alternatively with other languages if you separate it like that:

在此处输入图片说明

In the Android view, the manifest folder is considered a source root.


Test roots have green folders (+ a green background):

在此处输入图片说明


The bar chart folder is an Android library module (note that this isn't the same as a regular Android module):

在此处输入图片说明

The main difference between this and a regular Android module is that it applies the Gradle plugin com.android.library, compared to the regular com.android.application you find in the regular Android modules.


We also have plain folders:

在此处输入图片说明

And these are just folders. They may contain assets or resources, but aren't considered anything special. They're also not linked to anything in the IDE, but they may still have relevance depending on your build system. It doesn't always pick up on stuff like that.


Generated sources have a separate icon too, with a gear-like icon in the bottom right corner:

在此处输入图片说明


This one should be familiar:

在此处输入图片说明

This is the icon for a package. Note that it's not only used in source sets, it's also used under resources and assets.


Speaking of resources and assets, that brings us to the next icon:

在此处输入图片说明

This is used for any resource root, although Android treats these differently during compilation and loading.


And while on that topic, test resources have their own icon as well:

在此处输入图片说明

This is in addition to having a green background


Orange folders (using a near standard theme, and again, the colors vary. Refer your color scheme for more info if you're using a non-standard theme) show excluded folders.

在此处输入图片说明

This is as per project structure, an you can chose folders to exclude. .gradle is excluded by default, as can be seen here:

在此处输入图片说明

But you can also chose other folders to exclude. This excludes it from indexing


And (in theory) last: The fake folder.

在此处输入图片说明

This isn't actually a folder - this is a file containing various config for the module, generated by IntelliJ. Yet, for some reason, it has a folder icon (at least for me). While this isn't a folder, I've added this to avoid confusion. While it looks like an Android module, it isn't.


These are all the unique folder icons I can find. I hope I haven't left any out.

Special note

If you use a plugin such as Material Theme UI, you might have different icons. Some plugins like that bundle custom icons, which makes this answer incorrect for those specifically. With the example one, all the icons (link: folder icons) are available with names.

Additionally, some of the stock IntelliJ icons can be found here with names, if you're ever in doubt. The modules folder appears to contain some of the folder icons as well. I haven't been able to pinpoint the sources for the Android-specific icons though, but that covers some of them.