This article is a part of series: Configuring Android Project Little Things That Matter Version Name & Code Static Code Analyses Tools Continuous Integration Everything we have discussed in current article is available in project. template gitignore When you create a new android project in it already comes up with file, but usually it does not contain all necessary rules. Android Studio gitignore To quickly generate and download files I recommend you to use site. Just type in necessary keywords like — , and click generate button. gitignore gitignore.io Android Intellij Check out file in template project. gitignore tools folder If you have some 3rd party , or which are related to your project don’t just drop them in root directory — it will create a mess. scripts rulesets other files (especially for those who are using Project View, not Android View) Try to create a folder (e.g. tools) and put all those files into this folder. Usually I put there custom , rules for and static code analysis tools like , , gradle scripts files proguard pmd findbugs lint . Check out folder in template project. tools flavors Flavors are used to create builds with different set-up. In most cases I immediately set-up two flavors — and which have different: dev prod applicationId versionCode / versionName server endpoints google services keys … <a href="https://medium.com/media/150ffe9e2eac6e98f04e23425871a4a7/href">https://medium.com/media/150ffe9e2eac6e98f04e23425871a4a7/href</a> Check out in template project. productFlavors keystore A is a binary file that contains one or more private keys used to sign your application. keystore When running or debugging your project from the , automatically signs your with a debug certificate generated by the . IDE Android Studio APK Android SDK tools There are several issues when using local debug : keystore expiration date of 365 days installing application from multiple computers requires uninstalling first google services require keystore SHA-1 fingerprint That’s why I usually generate debug and commit it to version control system. keystore <a href="https://medium.com/media/7d4160e8568fb62440027f97bd777ee0/href">https://medium.com/media/7d4160e8568fb62440027f97bd777ee0/href</a> Check out in template project. signingConfigs proguard On Android is used for three things: proguard shrink unused code — helps you to survive the 64k limit optimize code & APK obfuscate code — makes your APK difficult to reverse engineer The problem is that and significantly increase compilation time and make debugging harder. obfuscation code optimization That’s why it is better to use different rules for release and debug build: proguard rules-proguard.pro rules-proguard-debug.pro <a href="https://medium.com/media/cbe51bd728c582af5c1df256ac72b760/href">https://medium.com/media/cbe51bd728c582af5c1df256ac72b760/href</a> rules for build must have following lines to force ignore warnings, skip code obfuscation and optimization: Proguard debug proguard <a href="https://medium.com/media/c3d6ea14f4008e3de0f5ee2205dd4ae2/href">https://medium.com/media/c3d6ea14f4008e3de0f5ee2205dd4ae2/href</a> For version it will be much harder to setup rules, because almost every library has it’s own specific rules. Fortunately there is open source repository called — which contains rules for all major libraries. release proguard android-proguard-snippets proguard <a href="https://medium.com/media/7a10e36468e5b5690187ce6d02c1fcec/href">https://medium.com/media/7a10e36468e5b5690187ce6d02c1fcec/href</a> Check out and in template project. rules-proguard.pro rules-proguard-debug.pro strict mode Android helps you to detect different kinds of problems: StrictMode closable object is not closed file reading / network requests performed on main thread uri exposed … Whenever such problem is detected it can show you appropriate log or crash your application, depending on your configuration. I suggest you to turn it on only for build and use methods to detect all kind of problems. debug detectAll <a href="https://medium.com/media/e507e64b63df84012de67395421b43f3/href">https://medium.com/media/e507e64b63df84012de67395421b43f3/href</a> Here is example of log when you forgot to close : SQLiteCursor <a href="https://medium.com/media/865507608541eeb989184fb6a8612c92/href">https://medium.com/media/865507608541eeb989184fb6a8612c92/href</a> Check out in template project. StrictMode