Uygulamanız veya modülünüz için build.gradle dosyasını açın ve yapıları ekleyin
ihtiyaç duyacağınız her şeyi
öğrendiniz. Tüm mimariler için bağımlılık ekleyebilirsiniz
veya bir alt küme seçebilirsiniz.
Sürüm notlarında, her mimari bileşeni için bağımlılıkları bildirme talimatlarını inceleyin:
En güncel sürümler için AndroidX sürümleri sayfasına bakın
her bileşen için sürüm numaraları kullanın.
AndroidX yeniden düzenlemesi ve bu sınıfları nasıl etkilediği hakkında daha fazla bilgi
paketler ve modül kimlikleri için AndroidX'e taşıma bölümüne bakın.
Kotlin
Kotlin uzantı modülleri, çeşitli AndroidX bağımlılıklarında desteklenir. Bu
modüllerin adlarının sonuna -ktx son eki eklenir. Örnek:
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Add components to your project\n\n[Issue Tracker](https://issuetracker.google.com/issues/new?component=197448&template=878802)\n\nReport issues so we can fix bugs.\n\nBefore getting started, read the\n[Guide to app architecture](/topic/architecture) for useful principles that\napply to all Android apps and for guidance on\nusing architecture components together.\n\nArchitecture components are available from Google's Maven repository. To use\nthem, add the repository to your project.\n\nOpen the `settings.gradle` file and add the `google()` repository: \n\n### Groovy\n\n```groovy\ndependencyResolutionManagement {\n ...\n repositories {\n google()\n jcenter()\n }\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencyResolutionManagement {\n ...\n repositories {\n google()\n jcenter()\n }\n}\n```\n| **Warning:** The JCenter repository is read-only, as of March 31, 2021. For more information, see [JCenter service update](/studio/build/jcenter-migration).\n\nDeclare dependencies\n--------------------\n\nOpen the `build.gradle` file for your app or module and add the artifacts\nthat you need as dependencies. You can add dependencies for all architecture\ncomponents or choose a subset.\n\nSee the instructions for declaring dependencies for each architecture component in the release notes:\n\n- [Futures (found in androidx.concurrent)](/jetpack/androidx/releases/concurrent)\n- [Lifecycle (including ViewModel)](/jetpack/androidx/releases/lifecycle)\n- [Navigation (including SafeArgs)](/jetpack/androidx/releases/navigation)\n- [Paging](/jetpack/androidx/releases/paging)\n- [Room](/jetpack/androidx/releases/room)\n- [WorkManager](/jetpack/androidx/releases/work)\n\nSee [AndroidX releases](/jetpack/androidx/versions) for the most up-to-date\nversion numbers for each component.\n\nFor more information about the AndroidX refactor and how it affects these class\npackages and module IDs, see [Migrate to AndroidX](/jetpack/androidx/migrate).\n\nKotlin\n------\n\nKotlin extension modules are supported for several AndroidX dependencies. These\nmodules have the suffix `-ktx` appended to their names. For example: \n\n### Groovy\n\n```groovy\nimplementation \"androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version\"\n```\n\n### Kotlin\n\n```kotlin\nimplementation(\"androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version\")\n```\n\nbecomes \n\n### Groovy\n\n```groovy\nimplementation \"androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version\"\n```\n\n### Kotlin\n\n```kotlin\nimplementation(\"androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version\")\n```\n\nMore information, including docs for Kotlin extensions, can be found in the\n[KTX documentation](/kotlin/ktx).\n\n**Note:** For Kotlin based apps, make sure you use\n`kapt` instead of `annotationProcessor`. You should also\nadd the `kotlin-kapt` plugin.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [App Architecture: UI Layer - Get Started - Android Developers](/topic/libraries/data-binding/start)\n- [Work with observable data objects](/topic/libraries/data-binding/observability)\n- [Migrate from Kotlin synthetics to Jetpack view binding](/topic/libraries/view-binding/migration)"]]