How to disable Maven auto import automatically in IntelliJ IDEA?

Uncheck Project Settings | Maven | Importing | Import Maven projects automatically. For IDEA 14+ it’s under Settings | Build, Execution, Deployment | Build Tools | Maven | Importing | Import Maven projects automatically. For IDEA 2020+, open Settings | Build, Execution, Deployment | Build Tools and check “Reload projects after changes in the build … Read more

Intellij: add space after double slashes in line comment

If you press CTRL / or CMD / it will put // at the beginning of the line and the comment will be properly indented. // comment with two indents For this to work Comment at first column must be checked in Editor->CodeStyle->Javascript->Wrapping and Braces->Keep when reformatting like mentioned in another answer. This screenshot is … Read more

How to fix “Fail to connect to camera service” exception in Android emulator

From the Android Developers Docs: Calling Camera.open() throws an exception if the camera is already in use by another application, so we wrap it in a try block. Try wrapping that code in a try catch block like so: try { releaseCameraAndPreview(); if (camId == 0) { mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT); } else { mCamera = … Read more

Error: scala: No ‘scala-library*.jar’ in Scala compiler library

Open File -> Project Structures -> Libraries, remove any scala sdk in it, e.g. scala-sdk-2.11.8 in the following image. Click on +, then Scala SDK. Select the right Scala SDK from the list, for me, it’s Ivy-Scala-2.11.8 shown in the picture. Select the current project(mine is spark-test), click OK. Then click OK to close it. … Read more

IntelliJ key repeating idea.vim

it turns out that I need to type this in the mac terminal: defaults write -g ApplePressAndHoldEnabled -bool false This is not related with any of vim, intelliJ, etc. It seems that Mac wants to support accent characters by holding the key.