錯誤:`ERROR: 32-bit Linux Android emulator binaries are DEPRECATED...` 表明 Google 已棄用 32 位模擬器二進制,需顯式啟用或升級系統。
方案一:環境變量強制啟用 (臨時)
echo 'export ANDROID_EMULATOR_FORCE_32BIT=true' >> ~/.bashrc
source ~/.bashrc
# 重啟 Eclipse/Studio 後啟動 AVD
方案二:Eclipse 運行配置添加參數
- Run → Run Configurations → 選擇 Android Application
- Target 頁籤 → Additional Emulator Command Line Options 填入:`-force-32bit`
- Apply → Run
方案三:根治 — 遷移 64 位 Ubuntu
- Ubuntu 10.04 (Lucid) 已停止維護 (EOL 2015),**強烈建議重裝 Ubuntu 20.04/22.04 64 位**。
- 64 位系統可運行最新 Android Studio、模擬器 (支援 Apple Silicon/Intel x86_64)、KVM 加速,構建速度提升 3-5 倍。
- 舊項目兼容性:`dpkg --add-architecture i386 && apt update && apt install libc6:i386 libstdc++6:i386` 安裝 32 位庫即可運行舊 32 位二進制。
自動重試腳本 (應對網絡抖動)
#!/bin/bash
echo "====== start repo sync ======"
../bin/repo sync
while [ $? -eq 1 ]; do
echo "====== sync failed, re-sync in 3s ======"
sleep 3
../bin/repo sync
done