个人使用的Android Studio配置

Android Studio的每个新版本都或多或少有点问题,因此每次都重新安装并手动配置来避免配置继承的问题。

  • Export Live Template
  • Appearance & Behavior
    • Appearance
      • Theme: Darcula/Dark
      • UI Options - Disable Smooth scrolling
    • System Settings
      • HTTP Proxy
      • Memory Settings
  • Keymap(Delete old keys)
    • ShowProjectStructureSettings: Empty
    • Type alias: Empty
    • Go to Line: Column: Empty
    • Show vcs Log: Alt + 3
    • Show Logcat: Alt + 4
    • Show Local Changes: Alt + 2
    • Maximize/Restore Active Dialog: Ctrl + Alt + Shift + M
    • Compare with Clipboard: Ctrl + Alt + Shift + C
  • Editor
    • General - On Save - Enable Ensure every saved file ends with a line break
      • Auto Import: Enable 2 Add unambiguous imports on the fly, Optimize imports on the fly
      • Appearance
        • Disable Caret blinking
        • Disable Show line numbers
        • Enable Show method separators
      • Code Completion - Disable Match case
      • Console - Default Encoding: UTF-8
      • Smart Keys
        • Enable Use "CamelHumps" Words
        • Disable Reformat again to remove custom line breaks
      • Sticky Lines: Disable
    • Font - Font
      • Consolas: Size: 22.0
      • JetBrains Mono: Size: 18; Line height: 1.1
    • Color Scheme - Console Font
      • Consolas: Size: 16; Line height: 0.8
      • JetBrains Mono: Size: 13; Line height: 0.8
    • Code Style: Scheme: IDE
      • Groovy
        • Code Generation
          • Disable Line comment at first column
          • Enable Add a space at line comment start and Enforce on reformat
      • Kotlin
        • Set from Kotlin style guide
        • Tabs and Indents - Continuation Indent: 4
        • Wrapping and Braces: Disable New line after multiline entry
        • Code Generation
          • Disable Line comment at first column
          • Enable Add a space at line comment start and Enforce on reformat
    • UI Tools
    • Inlay Hints
      • Disable Code Vision
      • Enable Types - Kotlin
      • Enable Method chains - Kotlin
      • Enable Lambdas - Kotlin
  • Plugins(Install in Settings and wait for loading)
    • .ignore
      IDE settings/options/ignore.xml - starredTemplates:
      1
      /gitignore/Android.gitignore$/gitignore/C.gitignore$/gitignore/C++.gitignore$/gitignore/CMake.gitignore$/toptal/templates/Android.gitignore$/toptal/templates/AndroidStudio.gitignore$/gitignore/Java.gitignore$/toptal/templates/Java.gitignore$/gitignore/Kotlin.gitignore$/toptal/templates/Kotlin.gitignore$/toptal/templates/Intellij.gitignore$/toptal/templates/Intellij+all.gitignore$/toptal/templates/Intellij+iml.gitignore$/gitignore/Global/macOS.gitignore$/toptal/templates/macOS.gitignore$/gitignore/Global/Windows.gitignore$/toptal/templates/Windows.gitignore$/gitignore/Global/Linux.gitignore$/toptal/templates/Linux.gitignore$/toptal/templates/C++.gitignore$/toptal/templates/C.gitignore$/gitignore/Gradle.gitignore$/toptal/templates/Gradle.gitignore$/toptal/templates/JetBrains.gitignore$/gitignore/Global/JetBrains.gitignore$/toptal/templates/JetBrains+all.gitignore$/toptal/templates/JetBrains+iml.gitignore$/toptal/templates/Groovy.gitignore$/toptal/templates/Crashlytics.gitignore$/gitignore/Objective-C.gitignore$/gitignore/Swift.gitignore$/toptal/templates/Swift.gitignore$/toptal/templates/Objective-C.gitignore$/toptal/templates/Firebase.gitignore
    • ADB Idea
    • Archive Browser
    • Avocado
    • detekt
    • GLSL
    • JsonToKotlinClass
    • Kotlin Multiplatform
    • Nyan Progress Bar
    • String Manipulation
  • Version Control - Commit
    • Before Commit: Enable all
  • Build, Execution, Deployment
    • Build Tools: Manual Sync with remidners
    • Deployment: Enable all
  • Tools
    • Emulator: Disable Launch in the Running Devices tool window
    • Layout Inspector: Disable Enable embedded Layout Inspector
  • Open a project
  • Advanced Settings:
    • Enable Modal modal commit interface
  • Disable Show Project Gradient in the toolbar
  • Clean Gutter Icons, reorder tabs manually, and clean bottom tabs
  • Reorder window layouts and Store Current Layout as Default
  • Build project
  • Keymap(Delete old keys)
    • Build(Tool Window): Alt + 5
    • Repeat Last Action: Ctrl + Alt + Shift + R
  • Editor
    • Live Template: Disable compose related; Import from settings zip
  • Configure JsonToKotlinClass
  • Configure detekt
    • Enable background analysis
    • Config:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      complexity:
      ComplexCondition:
      active: false
      CyclomaticComplexMethod:
      active: false
      LargeClass:
      active: false
      LongMethod:
      active: false
      LongParameterList:
      functionThreshold: 22
      constructorThreshold: 22
      NestedBlockDepth:
      active: false
      TooManyFunctions:
      active: false

      exceptions:
      TooGenericExceptionCaught:
      active: false

      naming:
      FunctionNaming:
      ignoreAnnotated:
      - "Composable"
      style:
      LoopWithTooManyJumpStatements:
      active: false
      MagicNumber:
      active: false
      ReturnCount:
      active: false
  • Ctrl + Shift + Alt + L
    • Enable Optimize imports, Code cleanup, and Rearrange code
  • Log - COMPACT, Show Tag Names
  • Commit something and check changes:
    • Enable Show Diff in Separate Window
  • Stop at code: Disbale Show on Mouse Move