android-java

Build Android Java apps with MVVM, ViewBinding, and lifecycle-safe code.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/lciacci/tessera --skill android-java-lciacci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-java
Source: https://github.com/lciacci/tessera/tree/main/skills/android-java
Command: npx skills add https://github.com/lciacci/tessera --skill android-java-lciacci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a consistent approach to building maintainable Android applications in Java, reducing architectural drift, lifecycle bugs, memory leaks, and unreliable UI behavior.

Core Features & Use Cases

  • MVVM Architecture: Organize Android applications with ViewModels, repositories, domain models, and clear data and presentation layers.
  • Android Development Patterns: Apply ViewBinding, lifecycle-aware Activities and Fragments, safe context usage, Retrofit, Room, dependency injection, and Gradle configuration.
  • Testing and Quality: Create JUnit, Mockito, and Espresso tests, configure Android CI workflows, and enforce lint, security, performance, and resource rules.
  • Use Case: When implementing a new Android Java feature, use this Skill to structure its data, domain, and UI layers, connect it to a ViewModel, add lifecycle-safe binding, and cover its behavior with unit and instrumentation tests.

Quick Start

Use the android-java skill to implement the requested Android Java feature with MVVM, ViewBinding, lifecycle-safe code, and appropriate JUnit or Espresso tests.

Frequently Asked Questions about android-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an Android Java app using MVVM to prevent memory leaks?

Structure your Android Java app with MVVM by organizing ViewModels, repositories, and domain models into clear layers. This approach separates data and presentation, using lifecycle-aware components and ViewBinding to prevent memory leaks and architectural drift.

How do I set up ViewBinding in Android Java Fragments for lifecycle-safe UI updates?

Set up ViewBinding in Android Java Fragments by initializing the binding in onCreateView and clearing it in onDestroyView. This lifecycle-safe pattern ensures UI references are nullified before destruction, preventing memory leaks and unreliable UI behavior.

What's the best way to write Espresso instrumentation tests for Android ViewModels?

Write Espresso instrumentation tests for Android ViewModels by verifying UI interactions and state changes through repository mocks. Combine this with JUnit and Mockito for unit tests to achieve comprehensive coverage of both presentation and data layers.

Does this Android development approach require specific Gradle configuration for lint validation?

Yes, this Android development approach requires specific Gradle configuration to enforce Android lint rules. Configuring Gradle correctly ensures security, performance, and resource validation are checked during CI workflows, maintaining code quality.

Can I use Retrofit and Room with Java in an MVVM Android architecture?

Yes, you can use Retrofit and Room with Java in an MVVM Android architecture. These libraries integrate into the repository layer to manage network and local database operations, providing clear data flow to your ViewModels.

Why does my Android Java Fragment lose state during screen rotation?

Your Android Java Fragment loses state during screen rotation if state handling is not lifecycle-aware. Proper MVVM organization stores state in ViewModels, which survive configuration changes, while ViewBinding ensures the UI safely reflects the retained state.