应用在模拟器上运行良好,但我无法在我的设备(小米Mi4)上启动应用程序。起初我看到了这样的对话框:
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?
但是在我同意之后,我在日志中看到了这条消息:
Launching app
$ adb install-multiple -r <....>
$ adb shell pm uninstall com.example.app.debug
Unknown failure (Failure - not installed for 0)
Error while Installing APKs
我已经多次重新启动设备并将其插入/拔出电脑,但没有任何帮助。