[ACCEPTED]-How to import .XML code style into Android Studio-android-studio
intellij-java-google-style.xml into the directory
I am using Android Studio 1.2 on Ubuntu 13 12.04 and in my case I have an .AndroidStudio1.2 12 folder in my home directory. In this folder 11 there is a config folder. What I did was 10 the following:
- I created a new folder called codestyles in the config folder.
- copied my style xml (in my case named AndroidStyle.xml) into the codestyles folder (.AndroidStudio1.2/config/codestyles/AndroidStyle.xml)
- Went into File>Settings>Editor>Code Style
- Chose the AndroidStyle among the listed Schemas.
NOTE: Android Studio does 9 not give you an option to import the xml 8 file. And before you add the file to the 7 codestyles folder there is NO indication 6 that you can change the Schema to your own 5 in any way. But after you have added the 4 file the added schema will be shown among 3 the other schemas.
NOTE 2: In other Operating 2 systems this folder is located elsewhere. For 1 more info on configuration folders see here: http://tools.android.com/tech-docs/configuration
In the latest Android Studio (as of this 2 edit, 4.1.1) you can go to
Preferences -> Editor -> Code Style -> Scheme -> Settings Icon (Gear) -> Import Scheme... and import the 1 xml there.
If you are on Android Studio Preview you 2 will need to copy your style xml file to:
where 1 X.X is your Preview version ie. 1.4
Also, for those who use Android Studio on 3 windows. Copy your xml file to
$USER_SPACE$\.AndroidStudio1.X\config\codeStyles. If you 2 don't have the codeStyles folder, just create 1 one. And then you will see it in
Here are steps I used to import my coding 1 style for a project.
codingStyle.xmlto .idea folder under your project.
- In Android Studio select
Projectfor coding style scheme, click OK.
- Place original
codingStyle.xmlto .idea folder again (Android Studio most likely had overwritten with default settings your
codingStyle.xmlwhen you click OK on step 2)
- Restart Android Sturdio.
More Related questions