KtLint & Detekt are tools that help us keep our code formatted in the same way and sometimes even help us spot errors before they are actually merged to master or develop.
Most of the CI integrations already include a detekt step before the unit tests are run. To avoid waiting for the CI, you can easily integrate ktlint as part of Git hooks. So every time when you decide to commit, Git hooks run and ktlint analyzes the committed files and prevents you from pushing until you fix your errors.
From time to time I get this really nasty bug where the toolbar in Android Studio is aligned to the start of the screen.
I mean the part where you select the device and press Run, for some reason sometimes just moves to the left and bringing it back to the right is a bit of a pain. Also if you hide the main navigation toolbar by accident, then it is really hard to bring it back. Here is the solution:
Close Android Studio.
Go to Home/.config/Google/AndroidStudio2020.3/options
After that just start Android Studio as normal and all of the toolbars will be placed as they were by default.
Generating a signed build using Android Studio Arctic Fox version 2021.3.1 seem to be a tricky thing to do. I spent several hours just to figure out where the issue is and at the end, I still don’t know what is the exact reason for signing to not work.
I was really wondering how I can remove repetitive tasks from Android Studio by assigning shortcuts or tags and I found that IntelliJ has Live Templates which I bet that little programmers use. So as an example I wanted when I type the word “tag” within a class the following to be autocompleted: