如何编辑Android Studio的「New」菜单并移除其中的元素?
Hey there! Totally get where you're coming from—Android Studio's New menu can get cluttered real quick, especially as you install more plugins or juggle different project types. Let's break down exactly how you can trim it down to only the stuff you actually use.
Most of the bloat in the New > File submenu comes from pre-installed or plugin-added file templates you never touch. Here's how to turn them off:
- Open Android Studio, head to
File > Settings(useCtrl+Alt+Son Windows/Linux,Cmd+,on Mac for a shortcut) - Navigate to
Editor > File and Code Templates - Switch to the
Filestab—this lists every template that shows up in yourNew > Filemenu - Uncheck the box next to any template you don't need (like
HTML File,XML Fileif you rarely work with web stuff, or random plugin-added templates) - Hit
ApplythenOK, and your menu will shrink right away
If you want even more precision—like removing whole top-level New menu items (not just file templates) or rearranging things—use the menu customization tool:
- Go to
File > Settings > Appearance & Behavior > Menus and Toolbars - In the left pane, expand
Main Menu>File>New—this shows every single item in yourNewmenu, fromActivitytoFileto plugin-specific entries - To remove an item, select it and click the
-button at the top-right corner - You can also rearrange items with the up/down arrows, or add custom entries if you want to prioritize your go-to options
Pro tip: If you ever overdo it and want to reset everything, just click the
Restore Defaultsbutton to get back to the original menu layout
Sometimes random menu entries pop up because of third-party plugins you installed. Here's how to fix that:
- Go to
File > Settings > Plugins - Scan the list for plugins that might be adding those unwanted menu items (for example, a Flutter plugin adds Flutter-specific
Newoptions) - Either disable the plugin if you don't use it anymore, or check if the plugin has its own settings to hide those extra menu entries
That should cover all the ways to slim down your New menu to be way more manageable. No more scrolling through a mile of options just to create a simple Kotlin class!
内容的提问来源于stack exchange,提问作者Adam Varhegyi

