مدير الحساب
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
avdmanager
هي أداة سطر أوامر تتيح لك إنشاء وإدارة
أجهزة Android الافتراضية (AVD) من سطر الأوامر. يتيح لك AVD تحديد
خصائص هاتف Android أو ساعة Wear OS أو جهاز Android TV
تريد محاكاته في محاكي Android.
إذا كنت تستخدم "استوديو Android"، لن تحتاج إلى استخدام هذه الأداة
يمكن بدلاً من ذلك
إنشاء متوسّط مدة المشاهدة وإدارتها من بيئة التطوير المتكاملة
أداة avdmanager
مضمّنة في حزمة أدوات سطر الأوامر لحزمة تطوير البرامج (SDK) لنظام التشغيل Android
بنسبة
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]
|
إنشاء متوسّط مدة مشاهدة جديدة يجب تقديم name لمتوسّط مدة المشاهدة
حدِّد رقم تعريف حزمة SDK لاستخدامها مع AVD باستخدام
تم تضمين sdk_id بين علامتَي اقتباس.
على سبيل المثال، ينشئ الأمر التالي متوسّط مدة المشاهدة (AVD) باسم "test ".
استخدام صورة النظام x86 للمستوى 25 لواجهة برمجة التطبيقات:
avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
في ما يلي وصف لاستخدامات الخيارات الأخرى:
-
-c {path|size} : المسار إلى بطاقة SD
صورة البطاقة لـ AVD هذا أو حجم صورة بطاقة SD الجديدة لإنشائها
لـ AVD هذا بالكيلوبايت أو ميغابايت، يشار إليه بالرمز K أو
M على سبيل المثال، -c path/to/sdcard/ أو
-c 1000M
-
-f : فرض إنشاء متوسّط مدة المشاهدة استخدِم هذا الخيار إذا كنت
يجب استبدال متوسّط مدة مشاهدة حالية بـ متوسّط مدة مشاهدة جديد يحمل الاسم نفسه.
-
-p path : المسار إلى الموقع حيث
فسيتم إنشاء دليل لملفات AVD هذه. إذا لم تحدد
مسار، يتم إنشاء AVD في
~/.android/avd/
|
delete avd -n name
|
حذف متوسّط مدة المشاهدة يجب تحديد متوسّط مدة المشاهدة باستخدام السمة name.
|
move avd -n name [-p path] [-r
new-name]
|
نقل متوسّط مدة المشاهدة أو إعادة تسميته يجب تحديد متوسّط مدة المشاهدة باستخدام السمة name.
في ما يلي وصف لاستخدامات الخيارات الأخرى:
-
-p path : المسار المطلق للموقع في
لإنشاء الدليل الذي سيتم نقل ملفات AVD هذه عليه. في حال حذف
إذا لم تضمِّن هذه الوسيطة، لن يتم نقل متوسّط مدة المشاهدة. قد تريد
اختَر عدم تضمين هذه الوسيطة إذا كنت تريد إعادة تسمية متوسّط مدة المشاهدة في
الْمَكَانْ.
-
-r new-name : الاسم الجديد لـ AVD
تمت إعادة تسميته.
|
list [target|device|avd] [-c]
|
أدرِج جميع الأهداف أو تعريفات الأجهزة أو متوسّطات مدة المشاهدة المتاحة. إذا لم تحدد
تحديد target أو device أو avd
avdmanager يدرج الثلاثة. تضمين -c
للحصول على ناتج مكثف مناسب للنصوص البرمجية. تشير رسالة الأشكال البيانية
لا تتوفّر الوسيطة -c عند إدراج الخيارات الثلاثة جميعها.
|
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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. |"]]