Set up your Android project
Stay organized with collections
Save and categorize content based on your preferences.
Create a new Compose project
Android Studio projects need configuration to work with Relay. To start, create
a project that supports Jetpack Compose version 1.2 or newer.
- In Android Studio, create a new project (
File
>
New
>
New
Project…
).
Select
Empty Compose Activity
and click
Next
.
Give your project a name. Accept all other defaults, including the language
as Kotlin and the minimum SDK as
API 21: Android 5.0 (Lollipop)
and click
Finish
.
Edit module-level Gradle build file
Set up the module-level Gradle build file to use the Relay Gradle plugin.
Open
build.gradle
(Module:
Hello_Figma.app
? This can vary based on the
name you entered above). This is the module-level Gradle build file.
Add the Relay plugin in the module's Gradle file as shown below, changing
the version number as appropriate. Save the file.
Groovy
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.relay' version '0.3.12'
}
Kotlin
plugins {
id("com.android.application")
id("kotlin-android")
id("com.google.relay") version "0.3.12"
}
Click
Sync Now
.
Recommended for you
Content and code samples on this page are subject to the licenses described in the
Content License
. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-30 UTC.
[{
"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 understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]