Configuration example with ktlint, gradle plugin, and intellij plugin working together.
- Download ktlint plugin here https://plugins.jetbrains.com/plugin/download?rel=true&updateId=287040
- Open Android Studio and open Android Studio top Menu -> Preferences.
- Select Plugins, click Settings icon and then click Install Plugin from Disk.
- Select the plugin archive file and click OK.
- Click OK to apply the changes and restart your IDE if prompted.