Avdmanager
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
avdmanager
הוא כלי שורת פקודה שמאפשר ליצור ולנהל
מכשירים וירטואליים של Android (AVD) משורת הפקודה. AVD מאפשר להגדיר
מאפיינים של טלפון Android, שעון Wear OS או מכשיר Android TV
שרוצים לדמות באמולטור Android.
אם אתם משתמשים ב-Android Studio, אתם לא צריכים להשתמש בכלי הזה.
יכול במקום זאת
יצירה וניהול של AVD בסביבת הפיתוח המשולבת (IDE).
הכלי avdmanager
כלול בחבילת כלי שורת הפקודה של Android SDK
על
android_sdk/cmdline-tools/version/bin/avdmanager
.
תחביר
כדי להשתמש ב-avdmanager
, צריך להשתמש בתחביר הבא:
avdmanager [global options] command [command options]
אפשרויות כלליות
טבלה 1. רשימת אפשרויות גלובליות עבור
avdmanager.
אפשרות גלובלית
|
תיאור
|
-s | --silent
|
מצב שקט: רק השגיאות מודפסות.
|
-h | --help
|
עזרה לגבי שימוש.
|
-v | --verbose
|
'מצב מלל': הדפסה של שגיאות, אזהרות והודעות אינפורמטיביות.
|
--clear cache
|
מנקים את מטמון המניפסט של מאגר SDK Manager.
|
אפשרויות של פקודות ופקודות
טבלה 2. רשימה של פקודות ואפשרויות
ל-avdmanager.
פקודה ואפשרויות
|
תיאור
|
create avd -n name -k "sdk_id" [-c
{path|size}] [-f] [-p path]
|
יוצרים AVD חדש. צריך לציין name ל-AVD וגם
לציין את המזהה של חבילת ה-SDK שתשמש את ה-AVD באמצעות
sdk_id מוקף במירכאות.
לדוגמה, הפקודה הבאה יוצרת AVD בשם test
באמצעות תמונת מערכת x86 לרמת API 25:
avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
בהמשך מתוארים השימושים באפשרויות האחרות:
-
-c {path|size} : הנתיב לכרטיס ה-SD
תמונת כרטיס עבור ה-AVD הזה או הגודל של תמונת כרטיס SD חדשה ליצירה
ל-AVD הזה ב-KB או ב-MB, מסומן באמצעות K או
M . לדוגמה, -c path/to/sdcard/ או
-c 1000M .
-
-f : אילוץ יצירה של ה-AVD. כדאי להשתמש באפשרות הזו אם
תצטרכו להחליף AVD קיים ב-AVD חדש עם אותו השם.
-
-p path : נתיב למיקום שבו
תיווצר עבור הקבצים של ה-AVD הזה. אם לא מציינים
נתיב, ה-AVD נוצר
~/.android/avd/
|
delete avd -n name
|
מחיקה של AVD. צריך לציין את ה-AVD עם name.
|
move avd -n name [-p path] [-r
new-name]
|
העברה של AVD או שינוי השם שלו. צריך לציין את ה-AVD עם name.
בהמשך מתוארים השימושים באפשרויות האחרות:
-
-p path : הנתיב המוחלט למיקום ב-
כדי ליצור את הספרייה שאליה יועברו קובצי ה-AVD. אם המיקום
אם לא כוללים את הארגומנט הזה, ה-AVD לא יועבר. ייתכן ש
בוחרים לא לכלול את הארגומנט הזה אם רוצים לשנות את השם של ה-AVD
במקום.
-
-r new-name : השם החדש של ה-AVD
שינה את השם.
|
list [target|device|avd] [-c]
|
הצגת רשימה של כל היעדים, הגדרות המכשיר או רכיבי ה-AVD הזמינים. אחרת
לציין target , device או avd ,
avdmanager מפרט את כל השלושה. צריך לכלול את -c
ארגומנט לקבלת פלט קומפקטי שמתאים לסקריפטים.
הארגומנט -c לא זמין כשמציגים את כל שלוש האפשרויות
את כל החלקים.
|
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון 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-07-27 (שעון UTC)."],[],[],null,["# avdmanager\n\nThe `avdmanager` is a command-line tool that lets you create and manage\nAndroid Virtual Devices (AVDs) from the command line. An AVD lets you define the\ncharacteristics of an Android handset, Wear OS watch, or Android TV device\nthat you want to simulate in the Android Emulator.\n\nIf you're using Android Studio, then you don't need to use this tool and you\ncan instead\n[create and manage AVDs from the IDE](/studio/run/managing-avds).\n\nThe `avdmanager` tool is included in the Android SDK Command-Line Tools package\nat\n\u003cvar translate=\"no\"\u003eandroid_sdk\u003c/var\u003e`/cmdline-tools/`\u003cvar translate=\"no\"\u003eversion\u003c/var\u003e`/bin/avdmanager`.\n\nSyntax\n------\n\nTo use `avdmanager`, use the following syntax: \n\n```\navdmanager [global options] command [command options]\n```\n\n### Global options\n\n**Table 1.** List of global options for\navdmanager.\n\n| Global option | Description |\n|---------------------|-------------------------------------------------------------------------|\n| `-s` \\| `--silent` | Silent mode: only errors are printed out. |\n| `-h` \\| `--help` | Usage help. |\n| `-v` \\| `--verbose` | Verbose mode: errors, warnings, and informational messages are printed. |\n| `--clear cache` | Clear the SDK Manager repository manifest cache. |\n\n### Commands and command options\n\n**Table 2.** List of commands and options\nfor avdmanager.\n\n| Command and options | Description |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `create avd -n `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e` -k \"`\u003cvar translate=\"no\"\u003esdk_id\u003c/var\u003e`\" [-c {`\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`|`\u003cvar translate=\"no\"\u003esize\u003c/var\u003e`}] [-f] [-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`]` | Create a new AVD. You must provide a \u003cvar translate=\"no\"\u003ename\u003c/var\u003e for the AVD and specify the ID of the SDK package to use for the AVD using \u003cvar translate=\"no\"\u003esdk_id\u003c/var\u003e wrapped in quotes. For example, the following command creates an AVD named `test` using the x86 system image for API level 25: ``` avdmanager create avd -n test -k \"system-images;android-25;google_apis;x86\" ``` The following describes the usages for the other options: - `-c {`\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`|`\u003cvar translate=\"no\"\u003esize\u003c/var\u003e`}`: The path to the SD card image for this AVD or the size of a new SD card image to create for this AVD in KB or MB, denoted with `K` or `M`. For example, `-c path/to/sdcard/` or `-c 1000M`. - `-f`: Force creation of the AVD. Use this option if you need to overwrite an existing AVD with a new AVD using the same name. - `-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e: Path to the location where the directory for this AVD's files will be created. If you don't specify a path, the AVD is created in `~/.android/avd/`. |\n| `delete avd -n `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e | Delete an AVD. You must specify the AVD with \u003cvar translate=\"no\"\u003ename\u003c/var\u003e. |\n| `move avd -n `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e` [-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`] [-r `\u003cvar translate=\"no\"\u003enew-name\u003c/var\u003e`]` | Move or rename an AVD. You must specify the AVD with \u003cvar translate=\"no\"\u003ename\u003c/var\u003e. The following describes the usages for the other options: - `-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e: The absolute path to the location at which to create the directory where this AVD's files will be moved. If you don't include this argument, the AVD won't be moved. You might choose not to include this argument if you want to rename the AVD in place. - `-r `\u003cvar translate=\"no\"\u003enew-name\u003c/var\u003e: The new name of the AVD being renamed. |\n| `list [target|device|avd] [-c]` | List all available targets, device definitions, or AVDs. If you don't specify `target`, `device`, or `avd`, `avdmanager` lists all three. Include the `-c` argument to receive a compact output suitable for scripts. The `-c` argument is not available when listing all three options together. |"]]