Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

android-studio

/android-studio

Eksperckie wsparcie IDE Android Studio: synchronizacja Gradle, Logcat, Layout Inspector, SDK Manager i wirtualne urządzenia AVD.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Eksperckie wsparcie IDE Android Studio: synchronizacja Gradle, Logcat, Layout Inspector, SDK Manager i wirtualne urządzenia AVD.

Oryginalny opis (EN)

Expert Android Studio IDE assistance covering Gradle sync, Logcat, Layout Inspector, SDK Manager, and virtual devices (AVD). Use when developing native Android applications with Kotlin or Java.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 155 linii, 598 słów
Podgląd SKILL.md
---
name: android-studio
description: Expert Android Studio IDE assistance covering Gradle sync, Logcat, Layout Inspector, SDK Manager, and virtual devices (AVD). Use when developing native Android applications with Kotlin or Java.
---

# Android Studio

Android Studio is the official integrated development environment (IDE) for Android application development, built on IntelliJ IDEA with rich profiling and emulator tools.

## When to Use

- **Native Android & Jetpack Compose Development**: Official Google IDE with visual layout editor, Compose preview, and Profiler.
- **Gradle Build Script Optimization**: Configuring multi-module build logic with Kotlin DSL (`build.gradle.kts`).
- **Android Emulator & Device Management**: Running virtual and physical devices via ADB and headless emulator CLI.
- **App Performance & Memory Profiling**: Diagnosing frame drops, memory leaks, and CPU spikes using Android Studio Profiler.

## Quick Start

```bash
# Launch Android Studio or build project from command line
./gradlew assembleDebug

# Install and run on connected device/emulator
./gradlew installDebug
adb shell am start -n "com.example.app/.MainActivity"
```

## Core Concepts

### Jetpack Compose Preview & UI Inspection

Authoring declarative UI with multi-device previews:

```kotlin
import androidx.compose.foundation.layout.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

@Composable
fun MetricCard(title: String, value: String, modifier: Modifier = Modifier) {
    Card(
        modifier = modifier.padding(8.dp),
        colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
    ) {
        Column(modifier = Modifier.padding(16.dp)) {
            Text(text = title, style = MaterialTheme.typography.labelMedium)
            Spacer(modifier = Modifier.height(4.dp))
            Text(text = value, style = MaterialTheme.typography.headlineMedium)
        }
    }
}

// Interactive Preview for Android Studio Design Canvas
@Preview(name = "Light Mode", showBackground = true)
@Preview(name = "Dark Mode", uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES)
@Composable
fun MetricCardPreview() {
    MaterialTheme {
        MetricCard(title = "Network Throughput", value = "1.2 GB/s")
    }
}
```

### Modern Gradle Build Configuration (build.gradle.kts)

Multi-module build setup with version catalogs:

```kotlin
// app/build.gradle.kts
plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.compose.compiler)
}

android {
    namespace = "com.company.enterpriseapp"
    compileSdk = 35

    defaultConfig {
        applicationId = "com.company.enterpriseapp"
        minSdk = 26
        targetSdk = 35
        versionCode = 1
        versionName = "2026.1.0"
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }
}
```

### Headless Emulator & ADB Operations

Managing testing devices from command line:

```bash
# List available Android Virtual Devices (AVDs)
emulator -list-avds

# Launch AVD headlessly in CI runner
emulator -avd Pixel_8_API_35 -no-window -no-audio -no-boot-anim &

# Wait for device to complete boot
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
```

## Common Patterns

### Gradle Build Cache and Memory Optimization

**Problem**: Slow Gradle build and sync times inside Android Studio.

**Solution**:
Configure build properties in `gradle.properties`:

```properties
org.gradle.jvmargs=-Xmx4096m -XX:+UseParallelGC
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=true
android.useAndroidX=true
```

## Best Practices

**Do**:

- Migrate build scripts to Kotlin DSL (`build.gradle.kts`) and Gradle Version Catalogs (`libs.versions.toml`).
- Enable R8 code shrinking and resource minification (`isMinifyEnabled = true`) on release builds.
- Utilize Android Studio Profiler (CPU, Memory, Energy) before pushing production releases.
- Allocate sufficient heap memory to the Gradle daemon in `gradle.properties` (`org.gradle.jvmargs=-Xmx4096m`).

**Don't**:

- Leave debug signing credentials in open repositories; inject keystores via environment variables.
- Run heavy unit tests on the Android Emulator if pure JVM unit tests (`src/test`) suffice.
- Ignore Lint warnings; configure `lint { abortOnError = true }` in CI.

## Troubleshooting

| Error                                          | Cause                                                                 | Solution                                                                 |
| :--------------------------------------------- | :-------------------------------------------------------------------- | :----------------------------------------------------------------------- |
| `Gradle sync failed: Connection timed out`     | Proxy, firewall, or Gradle wrapper downloading over slow network.     | Check offline work in Gradle settings or use pre-downloaded wrapper.     |
| `Installed Build Tools revision is corrupted`  | Incomplete download of Android SDK Build Tools.                       | Open SDK Manager, uninstall affected Build-Tools version, and reinstall. |
| `Emulator: Process crashed with exit code 139` | Hardware acceleration (HAXM/Hypervisor) conflict or GPU driver issue. | Change Emulator settings > Emulated Performance: Graphics to 'Software'. |

## References

- [Android Studio User Guide](https://developer.android.com/studio/intro)

Wersje

W bazie nie ma innych skilli o nazwie android-studio.

Migawka bazy z 13.11.2026 · wersja paczki bc67c3ed521c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100android-sdk
    Eksperckie wsparcie w SDK Android: komponenty architektury, cykl życia Activity i Fragment, uprawnienia, WorkManager i optymalizacja Gradle.
  • 100android-emulator-build
    Buduje wersje Release APK w Gradle na emulatorze AVD uruchamianym po nazwie, z przypiętymi JDK i SDK, oraz je sprawdza; pomaga też przy błędach Gradle, adb i SDK.
  • 90kotlin-android
    Buduje i aktualizuje natywne aplikacje Android w Kotlinie z Compose lub View, dbając o zgodność z Gradle, AGP i SDK.
  • 100android-debugging
    Pomaga debugować problemy w Androidzie i KMP: Logcat, ADB, ANR, dekodowanie stack trace R8, wycieki pamięci, błędy buildu Gradle i rekompozycje Compose, zaczynając od przyczyny źródłowej.
  • 90Android Gradle
    Naprawia buildy Gradle na telefonie: zgodność AGP i Gradle, SDK, pamięć, daemon i tryb offline.
  • 100tracing-recompositions-at-runtime
    Dodaje do komponentu Jetpack Compose adnotację @TraceRecomposition, by w logcat widzieć, który parametr zmienił rekompozycję.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.