Android Studio运行报错:Installation failed with message Failed to establish session.解决方法

刚接触Android开发,就遇到各种坑,这个问题困了一下午,网上查了许多解决办法都没用,幸好还是解决了。

报错如下:
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?

解决办法:
直接找到提示的文件删除,重新编译运行。
具体步骤:
在Android Studio项目里删除一个文件split-apk,目录:app\build\intermediates\split-apk
然后选择上方工具栏 Build–>Clean Project,加载完毕然后直接点击小三角形运行代码即可。

你可能感兴趣的:(杂难解)