Clone wiki

bitbeaker / Android_Studio

Tips for using Android Studio

This page refers Android Studio config folder as {AS_config}. It is located in your home directory probably with a name .AndroidStudio.

Markdown files

For editing and previewing Markdown files, install
File -> Settings... -> Plugins -> Browse repositories... -> search Markdown

Mercurial integration

Menu bar: VCS -> Enable Version Control Integration -> select Mercurial from drop-down list

CheckStyle integration


File -> Settings... -> Checkstyle -> Configuration File -> Add:

  • Use a local CheckStyle file -> gradle/config/checkstyle/checkstyle.xml
  • set Active

Semantic syntax highlighting

Alternative syntax highlighting which has (at least) these properties:

  • variable visibilities:
    • local variable = green
    • method parameters = yellow
    • class variables = (brownish?) red
  • class = grayish blue
  • interface = bolded grayish blue
  • method from super class = gray

Copy Semantic.icls to {AS_config}/config/colors/ and restart Android Studio. Then from

File -> Settings... -> Editor -> Colors & Fonts -> select Semantic as Scheme name

Syntax highlighting for Javascript

Works only for separate .js files, not javascript embedded in html files. Source:

Copy Javascript.xml to {AS_config}/config/filetypes/ and restart Android Studio.

Exclude unwanted information from LogCat

  • Create new logcat filter, for example
    • by Log Tag (regex): ^(?!(NativeCrypto|MessageQueue|SurfaceTextureClient|VelocityTracker|ActivityThread|OpenGLRenderer|jdwp))
    • by Package Name:
  • You may also want to check settings from a tab Logcat in Run -> Edit Configurations...

Other useful stuff

File -> Settings... -> Editor -> General -> Appearance -> Show line numbers and Show whitespaces