我在 android studio 2.3
上启用了即时运行
。当我想在我的设备上运行该应用程序时出现此错误:
Installation failed with message . 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?
点击确定后我得到这个:
Session 'app':Error Installing APKs
我检查过 this和 this但它们都没有帮助我,因为我确实需要启用 instant run
(否则我正在处理的项目会花费很多时间)。
我的设备:华硕 Zenfone 2 Laser ZE500KL
最佳答案
据我所知,这个问题可能有两个原因:
首先是您的应用已经安装了相同的包名但证书不同,要解决此问题,请检查您的手机是否已经安装了该应用,然后将其卸载并尝试安装新的。
第二个原因可能是您尝试安装的应用程序的最低 SDK 版本高于设备的 Android 版本。要解决此问题,请确保您项目的“build.gradle”中定义的最低 SDK 版本低于您设备的 Android 版本。
希望对您有所帮助!
关于Android Studio - 应用程序安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44740279/