החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
נספח ג', הגרסה המינימלית התואמת ל-Car UI Plugin API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יצרני ציוד מקורי צפויים לעבור לגרסה החדשה ביותר של car-ui-lib-plugin-apis
(1.2.0 ואילך) בהקדם האפשרי. באופן אידיאלי, יצרני ציוד מקורי לא צריכים לשלוח יישומי פלאגין שמשתמשים בגרסה ישנה יותר.
למה אנחנו מבצעים את העדכון הזה?
יש תמיכה ב-API של Java 8 ואילך בגרסאות קודמות של Android באמצעות תמיכה בביטול הסוכרים של API של Java 8 ואילך.
הטמעות של ממשקי API חסרים מקובצות באפליקציות, וקוד הבייט של חבילות ה-APK נכתב מחדש כך שיתייחס להטמעות במקום לספריות בפלטפורמה.
כדי לטעון הטמעות של יצרני ציוד מקורי של רכיבי ממשק משתמש מפלאגין של ספריית ממשק המשתמש שברכב, צריך להפנות לשיטות שמוגדרות בממשקי car-ui-lib-plugin-apis
. הפניות השיטות האלה נוצרות מאפליקציות לפלאגינים של ספריית ממשק המשתמש שברכב במהלך זמן הריצה, מתוך הנחה שהחתימות של השיטות זהות בהטמעות של האפליקציה והפלאגין.
חלק ממערכות ה-build מאפשרות הסרה של סוכר מ-API בכל שלב בגלל דרישות של רמת SDK מינימלית ספציפית. יכול להיות שחתימות שיטות ללא סוכר של ממשקי car-ui-lib-plugin-apis
לא יהיו תואמות לחתימות שיטות ללא סוכר של הטמעת פלאגין של OEM, וכתוצאה מכך הפלאגינים לא ייטענו.
כתוצאה מכך, חלק מהאפליקציות ל-GAS שעברן הידור באמצעות מערכת ה-build הפנימית של Google לא תואמות לפלאגין של ספריית ממשק המשתמש ברכב. לכן הסרנו את כל יחסי התלות ב-API של Java 8 (וגם גרסאות מתקדמות יותר) שדורשים הסרה של סוכר. השינוי הזה מחייב עדכונים ב-API של הממשקים שמוגדרים על ידי car-ui-lib-plugin-apis
.
השלבים הנדרשים לפלאגינים של יצרני ציוד מקורי
כדי לעדכן את ה-API:
מעדכנים את הטמעת הפלאגין כך שישתמש בגרסה האחרונה של car-ui-lib-plugin-apis
. כדי לקבל את הגרסה האחרונה (1.2.0 ואילך), אפשר להיכנס אל Maven Repository של Google.
מעדכנים את הטמעת הפלאגין כך שתטמיע את הממשק PluginFactoryOEMV4
. כדי לבצע את השינוי הזה, צריך לבצע את השלבים הבאים כשמטמיעים רכיב באמצעות הפלאגין של ה-OEM. עדכון ההטמעה של יצרן הציוד המקורי (OEM) של:
סרגל הכלים, כדי להטמיע את ToolbarControllerOEMV2
.
פריטים ברשימת תוכן, כדי להרחיב את ContentListItemOEMV2
.
טיפול בתוצאות חיפוש של IME, כדי להרחיב את ImeSearchInterfaceOEMV2
.
מעדכנים את האפליקציה כך שתשתמש בגרסה האחרונה של ספריית ממשק המשתמש ברכב.
מה יקרה אם לא מחילים את העדכון הזה?
אם לא משלימים את השלבים שמפורטים בדף הזה עבור פלאגין של יצרן ציוד מקורי, אפליקציות שהוסרו מהן הסוכר (desugared), כמו Google Automotive Services (GAS), לא מצליחות לטעון הטמעות של הפלאגין Car UI Library ולא חלות התאמות אישיות של יצרן ציוד מקורי באמצעות מנגנון הפלאגין.
התאמות אישיות קיימות של RRO לספריית ממשק המשתמש ברכב לא מושפעות מהבעיה הזו וימשיכו לפעול כרגיל.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-06-12 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-06-12 (שעון UTC)."],[],[],null,["# Appendix C, minimum compatible version for Car UI Plugin API\n\nOEMs are expected to switch to the newest version of `car-ui-lib-plugin-apis`\n(1.2.0 or higher) as soon as possible. Ideally, OEMs shouldn't ship any plugin\nthat uses an older version.\n\nWhy this update?\n----------------\n\n[Java 8+](https://developer.android.com/studio/write/java8-support-table) APIs\nare supported for previous versions of Android through [Java 8+ API desugaring\nsupport](https://developer.android.com/studio/write/java8-support#library-desugaring).\nImplementations of missing APIs are compiled into apps and the byte code of APKs\nare rewritten to reference the implementations instead of the libraries on the\nplatform.\n\nLoading OEM implementations of UI components from a Car UI Library plugin\nrequires the referencing of methods defined by `car-ui-lib-plugin-apis`\ninterfaces. These method references are made from apps to Car UI Library plugins\nat runtime with the expectation that method signatures are identical in app and\nplugin implementations.\n\nSome build systems enable API desugaring at all times due to requirements of a\nspecific minimum SDK level. Desugared method signatures for\n`car-ui-lib-plugin-apis` interfaces may not match those in an OEM plugin\nimplementation that has not been desugared, which results in plugins failing to\nload.\n\nAs a result, some GAS apps compiled with the internal Google build system are\nincompatible with the Car UI Library plugin. Therefore, we've removed all\ndependencies on Java 8 (and higher) APIs that require desugaring. This change\nrequires updates to the API of the interfaces defined by\n`car-ui-lib-plugin-apis`.\n\nRequired steps for OEM plugins\n------------------------------\n\nFollow these steps to update your API:\n\n1. Update the plugin implementation to use the latest version of\n `car-ui-lib-plugin-apis`. To get the latest version of (1.2.0 or higher),\n see [Google's Maven\n Repository](https://maven.google.com/web/index.html#com.android.car.ui:car-ui-lib-plugin-apis).\n\n2. Update the plugin implementation to implement the `PluginFactoryOEMV4`\n interface. This change requires the following steps when a component is\n implemented by the OEM plugin. Update the OEM implementation of:\n\n 1. Toolbar, to implement `ToolbarControllerOEMV2`.\n\n 2. Content list items, to extend `ContentListItemOEMV2`.\n\n 3. IME search results handing, to extend `ImeSearchInterfaceOEMV2`.\n\n3. Update the app to use the latest version of the Car UI Library.\n\nWhat happens if this update is not applied?\n-------------------------------------------\n\nIf the steps provided on this page aren't completed for an OEM plugin, desugared\napps, such as the Google Automotive Services (GAS), fail to load implementations\nof the Car UI Library plugin and no OEM customizations are applied through the\nplugin mechanism.\n\nExisting RRO customizations for the Car UI Library are not affected by this\nissue and continue to perform as usual."]]