Executando seu Primeiro Aplicativo no Emulador
Compile, inicie e veja o Hello World na tela.
Executando seu Primeiro Aplicativo no Emulador é uma aula grátis de Jetpack Compose Academy no CoddyKit. Esta é a aula 4 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Jetpack Compose Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Jetpack Compose Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
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.
Perguntas Frequentes
A aula “Executando seu Primeiro Aplicativo no Emulador” é grátis?
Sim — o texto completo de “Executando seu Primeiro Aplicativo no Emulador” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Jetpack Compose Academy, atualize para CoddyKit PRO. O curso de Jetpack Compose Academy inclui 4 aulas no total.
O que vou aprender em “Executando seu Primeiro Aplicativo no Emulador”?
Compile, inicie e veja o Hello World na tela. Você pratica Jetpack Compose Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Jetpack Compose Academy?
Nenhuma experiência prévia é necessária. Jetpack Compose Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 4 de 4.
Quanto tempo leva a aula “Executando seu Primeiro Aplicativo no Emulador”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Jetpack Compose Academy?
Sim. Cada aula de Jetpack Compose Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- O que o Compose Substitui: Adeus ao XML
- Configurando o Android Studio para Compose
- Anatomia de uma Função @Composable
- Executando seu Primeiro Aplicativo no Emulador