Android Studio: how to remove/update the “Created by” comment added to all new classes?

By default Android Studio automatically adds a header comment to all new classes, e.g.

/**
 * Created by Dan on 11/20/13.
 */

Where is the setting to customize or remove it?

share improve this question
 

3 Answers

active oldest votes
up vote 85down voteaccepted

From the menu bar:

  • on Macs choose Android Studio -> Preferences
  • on Windows choose File -> Settings

Then look for File and Code Templates in the left hand pane.

You have two ways you can change this...

1) Select the Includes tab and edit the Created by... text directly.

Android Studio: how to remove/update the “Created by” comment added to all new classes?_第1张图片

2) Select the Templates tab and edit the #parse("File Header.java") line for any template that you desire.

Android Studio: how to remove/update the “Created by” comment added to all new classes?_第2张图片

Personally I followed option 1) and made the default header comment a TODO, e.g.

/**
 * TODO: Add a class header comment!
 */

These instructions are based on Android Studio v0.3.7.

你可能感兴趣的:(Android Studio: how to remove/update the “Created by” comment added to all new classes?)