Eseguire la prima app sull'emulatore
Compili, avvii e visualizzi Hello World sullo schermo.
Eseguire la prima app sull'emulatore è una lezione Jetpack Compose Academy gratuita su CoddyKit. Questa è la lezione 4 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Jetpack Compose Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Jetpack Compose Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
Time to See It Run
You wrote a Composable, now let's run it. In minutes you will watch Hello World appear on a virtual phone right inside Android Studio. 🚀
setContent Hooks Up Your UI
Every Compose app starts in MainActivity, where setContent connects your Composable tree to the screen. It is the bridge from Android to Compose.
setContent {
Greeting("World")
}Pick a Run Target
In the toolbar, choose a device to run on: your emulator or a plugged-in phone. Android Studio lists every available target in a dropdown.
Press the Green Run Button
Hit the green Run arrow (or Shift+F10). Android Studio builds your app, installs it on the device, and launches it automatically.
Gradle Builds the APK
Behind the scenes, Gradle compiles your code and bundles it into an installable app. The first build is slow, later ones are much faster.
Hello World Appears
The emulator boots, your app installs, and your Greeting shows on screen. That text came straight from your Composable function. 🎉
Preview vs Real Run
The @Preview pane shows UI fast without installing. Running on a device is the real thing, with full interactivity and actual behavior.
@Preview
@Composable
fun GreetingPreview() {
Greeting("World")
}Edit, Then Re-Run
Change your text, press Run again, and the app updates. This tight edit and run loop is how you iterate quickly on real screens.
Watch the Logcat
Logcat at the bottom streams logs from your running app. When something misbehaves, this is the first place you look for clues.
First Build Feels Slow
Do not worry if the first launch takes a while. Gradle is downloading and caching libraries. Subsequent runs reuse that cache and fly.
Stop and Re-Launch Anytime
Use the red Stop button to halt the app, then Run again to relaunch. You stay in full control of the build-and-test cycle.
Quick Check
Let's confirm what connects your Composables to the screen.
Recap: Your First App
You did it! setContent hooked up your UI, Run built and installed it, and Hello World appeared. Now you can edit, re-run, and watch Logcat as you go.
Domande Frequenti
La lezione «Eseguire la prima app sull'emulatore» è gratuita?
Sì — il testo completo di «Eseguire la prima app sull'emulatore» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Jetpack Compose Academy, passa a CoddyKit PRO. Il corso Jetpack Compose Academy include 4 lezioni in totale.
Cosa imparerò in «Eseguire la prima app sull'emulatore»?
Compili, avvii e visualizzi Hello World sullo schermo. Eserciti Jetpack Compose Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare Jetpack Compose Academy?
Non è richiesta alcuna esperienza precedente. Jetpack Compose Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 4 di 4.
Quanto tempo richiede la lezione «Eseguire la prima app sull'emulatore»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione Jetpack Compose Academy?
Sì. Ogni lezione Jetpack Compose Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- Cosa sostituisce Compose: addio XML
- Configurare Android Studio per Compose
- Anatomia di una funzione @Composable
- Eseguire la prima app sull'emulatore