קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מרחב השמות androidx כולל את הספריות של Android Jetpack. בדומה לספריית התמיכה, ספריות במרחב השמות androidx נשלחות בנפרד מפלטפורמת Android ומספקות תאימות לאחור בין גרסאות Android.
AndroidX הוא שיפור משמעותי של ספריית התמיכה המקורית של Android, שכבר לא מתחזקים אותה.
חבילות androidx מחליפות באופן מלא את Support Library, ומספקות תכונות זהות וספריות חדשות.
בנוסף, AndroidX כולל את התכונות הבאות:
כל החבילות ב-AndroidX נמצאות במרחב שמות עקבי שמתחיל במחרוזת androidx. חבילות Support Library ממופות לחבילות androidx.* תואמות. כדי לראות מיפוי מלא של כל המחלקות הישנות ופריטי ה-build אל המחלקות החדשות, אפשר לעיין בדף Package Refactoring.
בניגוד לספריית התמיכה, חבילות androidx מתוחזקות ומעודכנות בנפרד. החבילות של androidx משתמשות בניהול גרסאות סמנטי קפדני, החל מגרסה 1.0.0. אפשר לעדכן את ספריות AndroidX בפרויקט באופן עצמאי.
Version 28.0.0 היא הגרסה האחרונה של ספריית התמיכה.
לא יהיו יותר פריטי תוכן בספרייה של android.support.
כל פיתוח התכונות החדשות יתבצע במרחב השמות androidx.
אם רוצים להשתמש בספריות עם מרחבי שמות ב-androidx בפרויקט חדש, צריך להגדיר את ה-SDK של הקומפילציה ל-Android 9.0 (רמת API 28) ומעלה, ולהגדיר את שני הדגלים הבאים של Android Gradle plugin לערך true בקובץ gradle.properties.
android.useAndroidX: כשהדגל הזה מוגדר ל-true, הפלאגין של Android משתמש בספריית AndroidX המתאימה במקום בספריית תמיכה. אם לא מציינים את הדגל, ערך ברירת המחדל שלו הוא false.
android.enableJetifier: כשהדגל הזה מוגדר ל-true, הפלאגין של Android מעביר באופן אוטומטי ספריות קיימות של צד שלישי לשימוש בתלות של AndroidX על ידי כתיבה מחדש של הקבצים הבינאריים שלהן. אם לא מציינים את הדגל, ברירת המחדל היא false.
מידע נוסף על רכיבים זמין בדף הבית של Jetpack.
למידע נוסף על שינוי המבנה של החבילה מ-Support Library ל-androidx, אפשר לקרוא את הפוסט בבלוג בנושא.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# AndroidX overview\n\nThe `androidx` namespace comprises the [Android Jetpack](/jetpack) libraries. Like the Support Library, libraries in the `androidx` namespace ship separately from the Android platform and provide backward compatibility across Android releases.\n\nAndroidX is a major improvement to the original Android\n[Support Library](/topic/libraries/support-library), which is no longer maintained.\n`androidx` packages fully replace the Support Library by providing feature parity and new libraries.\n\nIn addition, AndroidX includes the following features:\n\n- All packages in AndroidX live in a consistent namespace starting with the\n string `androidx`. The Support Library packages have been mapped into\n corresponding `androidx.*` packages. For a full mapping of all the old classes\n and build artifacts to the new ones, see the\n [Package Refactoring](/jetpack/androidx/refactor) page.\n\n- Unlike the Support Library, `androidx` packages are separately maintained\n and updated. The `androidx` packages use strict [Semantic Versioning](https://semver.org/),\n starting with version 1.0.0. You can update AndroidX libraries in your project\n independently.\n\n- [Version 28.0.0](/topic/libraries/support-library/revisions#28-0-0)\n is the last release of the Support Library.\n There will be no more `android.support` library releases.\n All new feature development will be in the `androidx` namespace.\n\n| **Note:** Jetpack libraries don't send any user data to a backend service of any kind. This means that integrating a Jetpack library into your app has no impact on your app's [Data safety form](/guide/topics/data/collect-share) in the Play Console.\n\nUsing `androidx` libraries in your project\n------------------------------------------\n\nSee [Migrating to AndroidX](/jetpack/androidx/migrate) to learn how to migrate an existing project.\n\nIf you want to use `androidx`-namespaced libraries in a new project,\nyou need to set the compile SDK to Android 9.0 (API level 28) or higher and set\nboth of the following Android Gradle plugin flags to `true` in your\n[`gradle.properties`](/studio/build#properties-files) file.\n\n- `android.useAndroidX`: When this flag is set to `true`, the Android plugin uses the appropriate AndroidX library instead of a Support Library. The flag is `false` by default if it is not specified.\n- `android.enableJetifier`: When this flag is set to `true`, the Android plugin automatically migrates existing third-party libraries to use AndroidX dependencies by rewriting their binaries. The flag is `false` by default if it is not specified.\n\n| **Note:** Libraries in `androidx` officially support the [Gradle](https://gradle.org/) build tool with [Android Gradle plugin](/build/releases/gradle-plugin) and don't test or maintain compatibility with any other build configuration.\n\nAPI Reference\n-------------\n\nAll the packages and classes in the `androidx` namespace can be found in the\n[AndroidX reference section](/reference/androidx/packages).\n\nAdditional Resources\n--------------------\n\nLearn more about components on the Jetpack [home page](/jetpack).\nFor more information about the package refactoring from the Support Library\nto `androidx`,\nsee [the blog post](https://android-developers.googleblog.com/2018/05/hello-world-androidx.html)\non that topic."]]