הגדרה של 'בקצרה'

בדף הזה נסביר איך להגדיר את סביבת הפיתוח לשימוש בתכונה 'בקצרה'.

מוסיפים את התלות הספציפית של 'בקצרה' במודול של האפליקציה, על סמך הסוג של "בקצרה" שרוצים ליצור.

dependencies {
   // For AppWidgets support
   implementation "androidx.glance:glance-appwidget:1.1.0"

   // For interop APIs with Material 3
   implementation "androidx.glance:glance-material3:1.1.0"

   // For interop APIs with Material 2
   implementation "androidx.glance:glance-material:1.1.0"
}

הפעלת מהדר ההצעות לכתיבה

כדאי להגדיר את האפשרויות הבאות כדי לוודא שהמהדר (compiler) לכתיבה זמין עבור בקצרה


android {
   buildFeatures {
      compose true
   }

   composeOptions {
      kotlinCompilerExtensionVersion = "1.5.14"
   }

   kotlinOptions {
      jvmTarget = "1.8"
   }
}

אתם יכולים להוריד את הגרסה העדכנית ביותר של התכונה 'בקצרה' בדף הגרסאות של 'בקצרה'.