Emulator 的下載封存檔
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁提供 Emulator 版本的封存檔。如需授權資訊,請查看模擬器套件中的授權檔案。
為確保最佳體驗,請參閱模擬器系統需求。
如何手動安裝指定版本的模擬器
如要在 Studio 手動安裝指定版本的模擬器,您必須將所需的模擬器套件內容貼到 SDK 安裝目錄中,然後變更 package.xml
檔案內指定的模擬器版本。具體而言,請按照下列步驟操作:
- 找出 SDK 安裝目錄。這個目錄的預設位置會因平台而異:
- Windows 的目錄是
%LocalAppData%\Android\Sdk
。此路徑通常會展開為 C:\Users\<username>\AppData\Local\Android\Sdk
,但可能會因系統而異。
- macOS 的目錄為
$HOME/Library/Android/sdk
。
- Linux 的目錄則為
$HOME/Android/Sdk
。
如要查看 SDK 安裝目錄位置,請開啟 Studio,然後依序點選「Android Studio」>「Preferences」>「Appearances & Behavior」>「System Settings」>「Android SDK」。「Android SDK Location」檔案路徑就是您的 SDK 安裝目錄位置。
如果您是使用 macOS 且透過 Finder 瀏覽,系統可能不會預設顯示 Library
資料夾。如要前往該資料夾,請開啟 Finder 並依序點選「Go」>「Go to Folder」,然後搜尋「Library」。
- 重新命名 SDK 安裝目錄中現有的
emulator
目錄,因為您會在下一個步驟中將新下載的 emulator
目錄解壓縮。例如,將其命名為 emulator_original
。
- 將下載的模擬器 ZIP 檔案解壓縮,然後把內容移至 SDK 安裝目錄。
macOS:在將模擬器 ZIP 檔案解壓縮後執行下列指令,清除模擬器套件中的隔離屬性:
xattr -dr com.apple.quarantine emulator/
這樣一來,說明應檢查或封鎖套件的訊息應該會較少出現。
- 將
package.xml
檔案從 emulator_original
目錄貼到新的 emulator
目錄中。
變更 package.xml
檔案中指定的模擬器版本,改為您已經下載且想要使用的版本。做法是捲動至 package.xml
檔案的底部,然後找出類似下列內容的文字:
<revision><major>31</major><minor>1</minor><micro>4</micro></revision>
請在這段文字中指定您已經下載且想要安裝的模擬器版本。
[[["容易理解","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"]],[],[],[],null,["This page provides an archive of Emulator releases. Please review the\n[license file](https://cs.android.com/android/platform/superproject/+/master:prebuilts/android-emulator/NOTICE)\nin the emulator package for licensing information.\n\nFor the best experience, please review the [Emulator system requirements](/studio/run/emulator#requirements).\n\nHow to manually install a select version of emulator\n\nTo manually install a select version of emulator on Studio, you need to paste the desired\nemulator package contents into your SDK installation directory, and change the emulator version\nspecified in the `package.xml` file. Specifically, follow these steps:\n\n1. Locate your SDK installation directory. The default location of this directory varies by platform:\n - On Windows, it's the `%LocalAppData%\\Android\\Sdk` directory. This normally expands to `C:\\Users\\\u003cusername\u003e\\AppData\\Local\\Android\\Sdk`, although it might vary based on your system.\n - On macOS, it's the `$HOME/Library/Android/sdk` directory.\n - On Linux, it's the `$HOME/Android/Sdk` directory.\n\n You can check where your SDK installation directory is by opening Studio and clicking\n **Android Studio \\\u003e Preferences \\\u003e Appearances \\& Behavior \\\u003e System Settings \\\u003e\n Android SDK** . The **Android SDK Location** file path is your SDK installation\n directory location.\n\n If you're using macOS and browsing using Finder, the `Library` folder might not be\n visible by default. To navigate there, open Finder and click **Go \\\u003e Go to Folder**\n and search for \"Library.\"\n2. Rename the existing `emulator` directory in the SDK installation directory, because you'll unzip the newly downloaded `emulator` directory here in the next step. For example, call it `emulator_original`.\n3. Unzip the emulator zip file you downloaded. Move the contents into the SDK installation directory.\n4. On macOS: After unzipping the emulator zip file, clear the quarantine attribute on the\n emulator package by running:\n\n `\n xattr -dr com.apple.quarantine emulator/\n `\n\n This should reduce messages about whether the package should be checked or blocked.\n5. Paste the `package.xml` file from the `emulator_original` directory into the new `emulator` directory.\n6. Change the emulator version specified in the `package.xml` file to the version you\n have downloaded and want to use. To do this, scroll to the bottom of the `package.xml`\n file and find the text that looks like:\n\n `\n \u003crevision\u003e\u003cmajor\u003e31\u003c/major\u003e\u003cminor\u003e1\u003c/minor\u003e\u003cmicro\u003e4\u003c/micro\u003e\u003c/revision\u003e\n `\n\n This is where you should specify the emulator version you downloaded and want to install."]]