为 Redmi 4 returns 构建应用程序错误

Building app for Redmi 4 returns error

当我为 phone Xiomi Redmi 4 构建我的应用程序时,它显示错误,要求卸载以前的应用程序数据。但我是第一次构建该应用程序。

错误:

Installation failed with message Failed to establish session. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing. WARNING: Uninstalling will remove the application data! Do you want to uninstall the existing application?

转到设置中的开发者选项并禁用 MIUI 优化。它会要求您重新启动,然后它应该会工作。