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