Change Author template in Android Studio

前端 未结 7 1093
盖世英雄少女心
盖世英雄少女心 2020-12-22 17:43

I want to change the automatic author that appears when I create a file in AndroidStudio.

/**
 * Created by a556520 on 16/01/14.
 */
public class POI {


        
相关标签:
7条回答
  • 2020-12-22 18:17

    Actually the correct way to change the username is to change the name of the current user logged in into Windows. (if you're using windows)

    Android Studio uses the name saved in %USERNAME% variable. This is the name you get if you type whoami into a command console or batch file. And it is the name that is stored under C(orWhatEver):\User.

    To change the name you can not just change the name of the profile you are logged in. You need to create a new user and give it the correct name. This way, even if you reinstall AndroidStudio some day, you will end with the correct ${USER} again.

    The easier way surely is to just hard code your name into the template. But that is just treating the symptoms and you should use the way to fix the root cause.

    0 讨论(0)
提交回复
热议问题