Unity3d匯出Android的apk檔案時相關問題的解決辦法

來源:互聯網
上載者:User

標籤:3d遊戲開發   unity3d培訓   unity3d遊戲   unity培訓   unity3d學習   

【狗刨學習網】
今天上午著手將一個unity3d開發的小遊戲build到android手機上運行,結果遇到了不少問題。
首先遇到的第一個問題是在build到一半的時候,彈出如下報錯:Error building Player: UnityException: No platforms foundAndroid SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)? 
Minimum platform required for build is Android 4.0 (API level 14)
問題解決辦法:用android的sdk manager更新android的sdk更新完成後還是報錯,開啟sdk目錄C:sdkplatforms,發現檔案夾的名字是android-4.2,將檔案夾名字改成android-17該問題解決
繼續發布,接著產生了另外一個問題Error building Player: UnityException: Couldn‘t find Android device 
No Android devices found. If you are sure that device is attached then it might be USB driver problem, for details please check Android SDK Setup section in Unity Manual.
問題解決辦法:啟動android虛擬機器 AVD Manager或者串連上手機調試裝置解決了上面的兩個小問題後,apk安裝包終於產生了。
接下來開始安裝產生的apk到android虛擬機器運行,安裝時出現了如下報錯:android Installation error: INSTALL_FAILED_CONTAINER_ERROR解決辦法:在untiy3d的PlayerSetting中,將Install Location設定由原來的PreferExternal改成Automatic。

終於安裝好了apk檔案,然後在android的模擬器中運行時,卻出現了如下錯誤

解決辦法:在模擬器的參數設定中選中Use Host GPU這個選項

終於,遊戲在模擬器下運行起來了,是不是很酷呢?

12150723-5cbda98c306846d5b4b0b0eb6c62f325.png(252.26 KB, 下載次數: 0)

下載附件  儲存到相簿

1 分鐘前 上傳


聲明:此篇文檔時來自於【狗刨學習網】社區,是網友自行發布的Unity3D學習文章,如果有什麼內容侵犯了你的相關權益,請與官方溝通,我們會即時處理。更多精彩內容:www.gopedu.com

Unity3d匯出Android的apk檔案時相關問題的解決辦法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.