adb 安裝Unity 打包的apk遇到問題:adb: failed to install Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl1590213674.tmp/base.apk: Corrupt XML binary file


adb 命令安裝Unity apk遇到問題:adb: failed to install Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl1590213674.tmp/base.apk: Corrupt XML binary file

解決歷程。在網上直接粘貼問題沒有找到有效的解決方案。

最終是靠實驗來解決的:首先打開Editor->Preferences->External Tools中將Android SDK Tools installed with Unity的Android SDK路徑改成自己安裝的sdk。然后在使用Build And Run 打包出現了

下面的錯誤:  

Configure project :launcher
WARNING: The option ‘android.enableR8’ is deprecated and should not be used anymore.
It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8

通過網上查找解決方案最終:https://blog.csdn.net/weixin_42304838/article/details/117550474https://answers.unity.com/questions/1846144/how-to-remove-androidenabler8-from-the-project.html 解決了上面的問題

我又將Editor->Preferences->External Tools中將Android SDK Tools installed with Unity的Android SDK路徑改為Unity推薦的SDK前面的問題也不出現了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM