運行 Android 虛擬裝置時出錯

運行 Android 虛擬裝置時出錯

首先,我想讓大家知道,我對 Android 開發完全陌生,這是我第一次嘗試運行 Android 虛擬裝置。

當我從 Android Studio 運行 Android 虛擬設備時,我得到以下資訊:

ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
   you will have to do at least one of the following:
   - Use the '-force-32bit' option when invoking 'emulator'.
   - Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
   Either one will allow you to use the 32-bit binaries, but please be
   aware that these will disappear in a future Android SDK release.
   Consider moving to a 64-bit Linux system before that happens.

我將如何做到這一點(例如使用'-force-32bit')?

我使用的是Ubuntu 15.04 32位,在我的筆記型電腦上獨立運行不是在虛擬盒子上運行。我已啟用虛擬化技術。

答案1

若要從命令列啟動模擬器的實例,請導覽至tools/SDK 的資料夾。輸入模擬器命令如下:

emulator -avd <avd_name> [<options>]

您可以添加您的 avd 名稱來代替<avd_name>-force-32bit來代替[<options>]

閱讀文件這裡這裡了解有關從命令列控制模擬器的更多資訊。

若要從 Android studio 執行此操作,您可以編輯或建立運行配置:

  1. 打開編輯配置來自跑步菜單。

  2. 展開安卓應用項目並建立新配置或開啟現有配置。

  3. 選擇運行配置後,調整所需的運行配置設定:

    在裡面模擬器選項卡,指定任何模擬器選項其他模擬器命令列選項場地。所以放在-force-32bit這裡。

在官方中閱讀更多相關信息文件

相關內容