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 line in bold 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.06'
}
Kotlin
plugins { id("com.android.application") id("kotlin-android") id("com.google.relay") version "0.3.06"
}
Click Sync Now.
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 2023-05-26 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"
}]