explaingit

futurice/android-best-practices

20,481Audience · developerComplexity · 1/5DormantLicenseSetup · easy

TLDR

A written guide of Android development best practices covering build systems, libraries, architecture, testing, and debugging, no code, just do's and don'ts.

Mindmap

mindmap
  root((repo))
    Build and Dependencies
      Gradle setup
      Method limit
      Library choices
    Code Organization
      Activities vs Fragments
      Layout XML structure
      Resource files
    Testing and Quality
      Unit testing
      UI testing
      Debugging tools
    Security and Performance
      Sensitive data
      ProGuard obfuscation
      Memory leaks
      View hierarchies

Things people build with this

USE CASE 1

Set up a new Android project following industry-standard structure and build configuration.

USE CASE 2

Review your app's architecture to avoid common pitfalls like deep view hierarchies and memory leaks.

USE CASE 3

Choose the right testing strategy and debugging tools for your Android development workflow.

USE CASE 4

Secure sensitive data like API keys and passwords in your build configuration.

Tech stack

AndroidGradleOkHttpJacksonJUnitEspressoProGuard

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This repository is a written guide of do's and don'ts for Android app development, compiled by developers at the Finnish company Futurice from lessons learned building real Android apps. It is not software you install, it is a long document of opinionated recommendations meant to save other developers from reinventing the wheel. The guide covers a wide range of day-to-day decisions an Android team has to make. It recommends Gradle and its default project structure as the build system, keeping passwords and other sensitive data in a separate gradle.properties file outside source control, preferring Maven-style dependency resolution over checked-in jar files, and avoiding dynamic version numbers so builds stay repeatable. It names specific libraries (Jackson for JSON parsing, OkHttp for HTTP) and warns against heavy libraries like Guava because of Android's 65k method limit. It also gives guidance on choosing between Activities and Fragments, organizing layout XML files, splitting styles, keeping colors.xml and dimens.xml short, avoiding deep view hierarchies, and being careful with WebViews and memory leaks. For testing it points to JUnit, Espresso, and AssertJ-Android; for shipping it recommends ProGuard or DexGuard, SharedPreferences or ContentProviders for storage, Stetho for debugging, Leak Canary for memory leaks, and continuous integration. You would read this if you are starting a new Android project, joining an existing one, or cleaning up an app that has grown messy and want a checklist of community-tested defaults. The repository itself is documentation, with examples in Gradle and Android code snippets. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
I'm starting a new Android project. What does the Futurice best practices guide recommend for Gradle setup and project structure?
Prompt 2
How should I handle passwords and API keys in my Android app according to best practices?
Prompt 3
What testing libraries and approaches does this guide recommend for Android unit and UI testing?
Prompt 4
I'm getting memory leaks in my Android app. What debugging tools and practices does this guide suggest?
Prompt 5
Should I use Activities or Fragments for my Android screens? What does the guide say?
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.