Clean architecture tutorial for android: getting started

For the best experience developing with Jetpaông chồng Compose, you should Studio Arctic Fox. That’sbecause when you use Studio lớn develop your app with Jetpack Compose,you can benefit from smart editor features,such as New Project templates andthe ability khổng lồ immediately preview your Compose UI.

Bạn đang xem: Clean architecture tutorial for android: getting started

Get Studio Arctic Fox

After you've sầu installed Studio, follow the instructions below lớn try aJetpaông xã Compose sample tiện ích, create a new Jetpaông xã Compose tiện ích project, or addsupport for Jetpack Compose to lớn an existing tiện ích project.

Try Jetpaông xã Compose sample apps

After you’ve the lachạy thử version of Studio running, the faschạy thử way toexperiment with the capabilities of Jetpack Compose is by trying Jetpachồng Composesample appshosted on GitHub. To import a sample ứng dụng project from Studio, proceedas follows:

If you’re in the Welcome khổng lồ Studio window, select Import code sample. If you already have sầu an Studio project open,select File > New > Import Sample from the thực đơn bar.In the tìm kiếm bar near the top of the Browse Samples wizard, type"compose".Select one of the Jetpaông xã Compose sample apps from the tìm kiếm results và cliông chồng Next.Either change the Application nameProject location or keep themặc định values.Click Finish. Studio downloads the sample app lớn the path you specified & opens theproject. You can then inspect MainActivity.kt in each of the examples khổng lồ see Jetpack Compose APIs such as crossfadeanimation, custom components, using typography, and displaying light và darkcolors in the in-IDE previews.

Create a new app with tư vấn for Jetpachồng Compose

If you want to start a new project that includes support for Jetpachồng Compose bymặc định, Studio includes new project templates to help you get started.To create a new project that include Jetpack Compose, proceed as follows:

If you’re in the Welcome lớn Studio window, cliông chồng Start a Studio project. If you already have sầu an Studio project open,select File > New > New Project from the thực đơn bar.In the Select a Project Template window, select Empty ComposeActivity and cliông xã Next.In the Configure your project window, vày the following:Set the Name, Package name, và Save sầu location as younormally would.lưu ý that, in the Language dropdown thực đơn, Kotlin is the onlyavailable option because Jetpachồng Compose works only with classeswritten in Kotlin.In the Minimum API level dropdown thực đơn, select API cấp độ 21 orhigher.Clichồng Finish.

Xem thêm: Hướng Dẫn Xóa Sđt Garena Khi Bị Mất Sđt Và Email Mới 2021, Thay Đổi Số Điện Thoại

Now you're ready to lớn start developing an app using Jetpachồng Compose. To help youget started và learn about what you can bởi with the toolkit, try the JetpackCompose tutorial.

Note: After Studio finishes configuring your project, you might see abanner that asks you to lớn build your project. That's because the new module usesJetpaông chồng Compose live pReview, which requires you khổng lồ compileand build your project khổng lồ see a live pnhận xét.

Add Jetpaông xã Compose toolkit dependencies

Include Jetpaông xã Compose toolkit dependencies in your app’s build.gradle file,as shown below:


dependencies implementation "" // Tooling tư vấn (PReviews, etc.) implementation "" // Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.) implementation "" // Material Design implementation "" // Material design icons implementation "" implementation "" // Integration with activities implementation "" // Integration with ViewModels implementation "" // Integration with observables implementation "" implementation "" // UI Tests ""


dependencies implementation("") // Tooling tư vấn (PReviews, etc.) implementation("") // Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.) implementation("") // Material Design implementation("") // Material kiến thiết icons implementation("") implementation("") // Integration with observables implementation("") implementation("") // UI Tests"")

Add Jetpack Compose lớn an existing project

If you want to use Jetpaông xã Compose in an existing project, you’ll need toconfigure your project with required settings & dependencies. For moreinformation, see Adding Jetpachồng Compose to yourapp.

Xem thêm: Hướng Dẫn Ký Tên Bằng Tay - Hướng Dẫn Cách Ký Tên Đẹp Bằng Tay

Content & code samples on this page are subject to lớn the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.

< "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" , "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" , "type": "thumb-down", "id": "outOfDate", "label":"Out of date" , "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" , "type": "thumb-down", "id": "otherDown", "label":"Other" > < "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to lớn understand" , "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" , "type": "thumb-up", "id": "otherUp", "label":"Other" >


Discover Devices


Documentation và Downloads


Language English Bahasa Indonesia Español – América Latimãng cầu Português – Brasil 中文 – 简体 日本語 한국어

Chuyên mục: Kiến thức