explaingit

futurice/android-best-practices

Analysis updated 2026-06-21

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

TLDR

A written checklist guide from Futurice covering Android development best practices for build setup, library choices, architecture, testing, and CI, distilled from real consulting projects.

Mindmap

mindmap
  root((Android best practices))
    Build setup
      Gradle structure
      Secret management
      Stable versions
    Libraries
      Jackson for JSON
      OkHttp
      Avoid Guava
    Architecture
      Activities vs fragments
      Layout XML as code
      Shallow hierarchies
    Testing
      JUnit
      Espresso
      LeakCanary
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Audit an existing Android project to spot common pitfalls before they become production bugs.

USE CASE 2

Start a new Android project with a proven Gradle structure, dependency strategy, and architecture.

USE CASE 3

Set up continuous integration for an Android app using the testing and build guidance in the checklist.

What is it built with?

GradleJavaAndroidJUnitEspressoProGuard

How does it compare?

futurice/android-best-practicesopendataloader-project/opendataloader-pdftoml-lang/toml
Stars20,48120,47920,478
LanguageJava
Setup difficultyeasymoderateeasy
Complexity1/53/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

This is a written guide rather than a piece of software. The consultancy Futurice collected the dos and don'ts their Android developers had learned over many projects and published them as a single best-practices document so other teams can avoid reinventing the wheel. The README is organised as a long checklist with deeper explanations underneath each item. It opens with build advice, such as using Gradle and its default project structure, keeping passwords and keystore details out of build.gradle and in gradle.properties instead so they never reach version control, and preferring Maven-resolved dependencies over committed jar files with fixed static versions. It also warns against dynamic version ranges like 2.1.+ because they can produce unstable builds. It then moves through library choices, recommending Jackson for parsing JSON and OkHttp for HTTP rather than rolling your own client, and warning that pulling in heavy libraries such as Guava can push you over the 65,000-method limit that the platform imposes on a single dex file. Architecture sections cover when to lean on activities versus fragments, how to treat layout XML files as real code with shared styles, short colors.xml and dimens.xml palettes, and shallow view hierarchies. There is also a note on being careful with WebViews and avoiding leaks. The later sections cover testing with JUnit, Espresso, and AssertJ-Android, debugging with Stetho, finding memory leaks with Leak Canary, shrinking and obfuscating with ProGuard or DexGuard, picking SharedPreferences or ContentProviders for persistence, and running continuous integration. A developer would reach for this when starting a new Android project or auditing an existing one to spot patterns that tend to cause trouble later. Futurice publishes parallel guides for iOS and Windows app development.

Copy-paste prompts

Prompt 1
I am starting a new Android project. Based on the Futurice best practices, what is the recommended Gradle structure and how do I keep API keys out of build.gradle?
Prompt 2
My Android app is hitting the 65k method limit. Using the Futurice best practices guidance, help me identify which libraries to remove or replace.
Prompt 3
Walk me through setting up ProGuard for an Android release build following the Futurice recommendations.
Prompt 4
Help me set up JUnit and Espresso tests for an Android app following the Futurice best practices checklist.

Frequently asked questions

What is android-best-practices?

A written checklist guide from Futurice covering Android development best practices for build setup, library choices, architecture, testing, and CI, distilled from real consulting projects.

How hard is android-best-practices to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is android-best-practices for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub futurice on gitmyhub

Verify against the repo before relying on details.