Feed on
Posts
Comments
Email訂閱

This post is under 軟體開發

  1. 依照此文 Android Tutorial 第一堂(2)準備 Android Studio 開發環境 安裝 Android Studio。
  2. 執行模擬器失敗,因為必須啟用硬體加速
    • Android Studio在安裝時,便會偵測CPU是否支援硬體加速,並建議所使用的記憶體大小。當初如果不小心取消勾選,以後自行設定,可能就有問題。
    • 若後來發現HAXM沒有裝,可以參考此文看看硬體是否支援:ANDROID STUDIO 執行模擬器失敗解決辦法
    • 若是在安裝HAXM時,出現錯誤訊息如: “Failed to configure driver: unknown error. Failed to open driver”(通常出現在window7以及windows8.0)。若硬體的確為Intel CPU且有支援vt xd(可連至此網頁以CPU型號查詢),可參考這篇討論倒數第二篇文章:HAXM install fails on Windows 7 – “Failed to configure driver: unknown error. Failed to open driver”,解法如下:

      Connect your computer to internet
      From command line run “certmgr.msc”, go to “Trusted Root Certification Authorities” -> “Certificates”, ensure following certificate is there. If not existing, just wait for a while with computer connecting to internet, and it will be installed automatically
      AddTrust External CA Root AddTrust External CA Root 5/30/2020 Server Authenticati… USERTrust

      After the above certificate is there, then run the HAXM installer.

  3. 訊息視窗出現:“HAX is not working and emulator runs in emulation mode”。這是因為HAXM安裝時的記憶體設定與Android Studio 內部的設定不符,可參考此文 How to fix: “HAX is not working and emulator runs in emulation mode” 說明:The HAXM installer suggested a 1GB default, but the Nexus 5 AVD is set to use 1536. Set it back to 1GB and we’re on!
  4. 模擬器一直停留在開機畫面。這是因為電腦沒有支援 Audio device。參考這篇文章 Android Emulator hang up and impossible to quit 的解法:Run\Run configurations…\<Your configuration>\Target\Additional Emulator Commandline Options. Enter -noaudio。
  5. Android Studio模擬器預覽畫面不能正常顯示。這是因為升級到API22,但程式碼的Activity類別仍使用已廢棄的ActionBarActivity所導致。可以將預覽所使用的API調回到API21,或是改繼承Activity。

 

2 則回應 to “Setup Android Studio 1.2 (150506)”

  1. zomzad表示:

    感謝你分享我的文章
    [ANDROID STUDIO 執行模擬器失敗解決辦法]
    11月原有網域將回停用,更換為http://boookpage.com/
    此篇也已經挪至新網址Android分類下

留言區