יצירה או ייבוא של פרויקט
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Android Studio for Platform (ASfP) עוזר להגדיר את סביבת הפיתוח עבור פרויקט הקוד הפתוח של Android (AOSP). בדף הזה מוסבר איך להתחיל פרויקט חדש או לייבא פרויקט קיים.
יצירת פרויקט חדש
אם לא פתוח פרויקט, לוחצים על פרויקט חדש במסך הפתיחה. 
אם כבר פתוח פרויקט, בוחרים באפשרות ASfP > Project > New Project מהתפריט.
ממלאים את פרטי הגדרת הפרויקט באשף: 
- נתיבי מודולים: מציינים את הנתיב המוחלט אל שורש הקוד של AOSP (לדוגמה,
/path/to/aosp
).
- יעד לארוחת צהריים: מזינים את היעד לארוחת הצהריים שמשמש לבנייה (לדוגמה,
aosp_arm64-eng
).
- שם הפרויקט: נותנים לפרויקט שם תיאורי.
- Directories / modules: מזינים רשימה של התיקיות או המודולים הראשוניים שרוצים לכלול בפרויקט, מופרדים בפסיקים. אלה צריכים להיות נתיבים יחסיים משורש המאגר (לדוגמה,
frameworks/base,
packages/apps/Settings
). אפשר להוסיף עוד נתיבים או לשנות את הבחירה הזו מאוחר יותר.
לוחצים על סיום. ASfP יוצר את מבנה הפרויקט ואת .asfp-project
קובץ התצורה.
אחרי ההגדרה הראשונית של הפרויקט, אפשר להתאים אותו אישית עוד יותר על ידי עריכת הקובץ .asfp-project
שנמצא בתיקיית הבסיס של הפרויקט. הקובץ הזה מאפשר לכם:
- מוסיפים או מסירים ספריות ומודולים.
- להפעיל תמיכה בשפות אחרות כמו Rust או C++.
- מגדירים את דגלי ה-build ואת משתני הסביבה.
- מציינים את מקורות הבדיקה.
מידע מפורט על כל אפשרויות ההגדרה זמין במאמר סקירה כללית על פרויקטים. אחרי עריכת .asfp-project
, צריך לסנכרן את הפרויקט כדי שהשינויים ייכנסו לתוקף.
ייבוא פרויקט קיים
ב-ASfP אין פעולת 'ייבוא' נפרדת. כדי לפתוח הגדרה קיימת של ASfP:
- בוחרים באפשרות ASfP > Project > New Project.
- בשדה Project Name, עוברים אל הספרייה שמכילה את קובץ
.asfp-project
הקיים שרוצים לפתוח ובוחרים אותה. השדות באשף יאוכלסו על סמך הקובץ .asfp-project
שנבחר.
- לוחצים על סיום. הפרויקט ייפתח וייערך בו אינדוקס ב-ASfP.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-09-04 (שעון 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-09-04 (שעון UTC)."],[],[],null,["Android Studio for Platform (ASfP) helps you set up your development environment\nfor the [Android Open Source Project (AOSP)](https://source.android.com/). This page explains how to\nstart a new project or import an existing one.\n\nCreate a new project\n\n1. If you don't have a project open, click **New Project** on the Welcome\n screen.\n\n2. If you already have a project open, select **ASfP \\\u003e Project \\\u003e New Project**\n from the menu.\n\n3. Fill in the project configuration details in the wizard:\n\n - **Module paths:** Specify the absolute path to the root of your AOSP source code checkout (for example, `/path/to/aosp`).\n - **Lunch target:** Enter the lunch target you use for building (for example, `aosp_arm64-eng`).\n - **Project name:** Give your project a descriptive name.\n - **Directories / modules:** List the initial directories or modules you want to include in your project, separated by commas. These should be relative paths from the repository root (for example, `frameworks/base,\n packages/apps/Settings`). You can add more or refine this selection later.\n4. Click **Finish** . ASfP creates the project structure and the `.asfp-project`\n configuration file.\n\nConfigure and customize your project\n\nAfter the initial project setup, you can further customize your project by\nediting the `.asfp-project` file located in the project root. This file lets\nyou:\n\n- Add or remove directories and modules.\n- Enable support for other languages like Rust or C++.\n- Configure build flags and environment variables.\n- Specify test sources.\n\nFor detailed information on all configuration options, see the [Projects\noverview](/studio/platform/projects). After editing `.asfp-project`, you'll need to sync the project for\nthe changes to take effect.\n\nImport an existing project\n\nASfP doesn't have a separate \"import\" action. To open an existing ASfP project\nconfiguration:\n\n1. Select **ASfP \\\u003e Project \\\u003e New Project**.\n2. In the **Project Name** field, navigate to and select the directory containing the existing `.asfp-project` file you want to open. The fields in the wizard will populate based on the selected `.asfp-project` file.\n3. Click **Finish**. ASfP opens and indexes the project."]]