错误弹窗如图:

Installation failed with message Failed to finalize session: INSTALL_FAILED_TEST_ONLY:installPackageLI.

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?

解决方法:

1、打开菜单File——Settings——Build,Execution,Deployment——Instant Run

2、不选中Enable Instant Run to hot swap code/resource changes on deploy(default enabled)

3、依次点击Apply——OK,重新运行程序,大功告成。

备注:笔者所用手机是华为荣耀7,百度发现有人用小米手机也遇到这样的问题,解决方式是通用的,如果其他手机也遇到这种问题,欢迎大家留言讨论。

如果你没有成功,接下来使用第二招。

1、打开Edit Configurations...

2、在Install Flags中写上“-t”

3、依次点击Apply——OK,重新运行,大功告成。

到此问题已经解决。

如果你还没有解决,我也没有第三招了,如果你有了第三招,请记得留言告诉我一下~~~

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.的更多相关文章

  1. installation failed with message null

    http://stackoverflow.com/questions/33315753/installation-failed-with-message-null-genymotion-error I ...

  2. Installation failed with message INSTALL_CANCELED_BY_USER.

    Installation failed with message INSTALL_CANCELED_BY_USER. It is possible that this issue is resolve ...

  3. 安装APK时报 Installation failed with message Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Invalid apk.

    Installation failed with message Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Invali ...

  4. 【常见踩坑】USB调试安装失败(Installation failed with message INSTALL_CANCELED_BY_USER)

    一.写在前面 最近一直在忙活着项目重构,忙活了一个多月(那是天天加班,不分昼夜呀,ps:这不是我司要求的哈),终于把沉积了三四年的老项目给重构了,目前在测试阶段,也总算有了点闲时来跟大家分享分享一些问 ...

  5. 解决Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK的问题

    Android Studio 运行AVD的时候出现: Installation failed with message Failed to finalize session : INSTALL_FAI ...

  6. 小米系列手机调试Installation failed with message Failed to establish session

    用Android studio 2.3调度程序时提示"Installation failed with message Failed to establish session"错误 ...

  7. Installation failed with message INSTALL_FAILED_TEST_ONLY问题

    Android Studio连接手机进行app调试,遇到如下问题: Installation failed with message INSTALL_FAILED_TEST_ONLY. It is p ...

  8. Installation failed with message INSTALL_FAILED_UID_CHANGED.--APK安装失败解决方法

    出现此错误原因大都为:手机上原来APK存在残留,即没有卸载干净,导致不能安装新的APK 解决办法: 1.手机上手动卸载出现问题的APP,再重新安装 2.如果apk无法卸载,则将apk相关文件和相关内容 ...

  9. Android Studio安装应用时报错 installation failed with message Failed to finalize session......

    解决方法: 在AndroidManifest.xml中的provider中的authorities后加几个数字即可. 2017.09.01: 我发现有的项目AndroidManifest.xml中没有 ...

随机推荐

  1. CPU load高而使用率低的问题分析

    最近服务器上出现了一个很诡异的问题,症状如下图所示: 查看进程发现: 如上图所示,非常多的df -h进程没有退出.于是手工kill掉这些 df -h进程.cpu load恢复正常. 至于为什么会有这么 ...

  2. Java交流分享(522818473)

    今天来分享哈自己的技术交流群,记得还是刚接触Java建立的群,那时候学习Java很有动力,经常和群友谈论问题,现在都专注公司业务和技术这一块,很多后端框架都没用除了restful,其他都是封装的,不过 ...

  3. Redis集群master选举时长测试

    在一台物理机上启动6个Redis实例,组成3主3从集群,端口号依次为:1379 ~ 1384,端口号1379.1380和1384三个为master,端口1379的进程ID为17620.现将进程1762 ...

  4. 正则表达式Regular expressions

    根据某种匹配模式来寻找strings中的某些单词 举例:如果我们想要找到字符串The dog chased the cat中单词 the,我们可以使用下面的正则表达式: /the/gi 我们可以把这个 ...

  5. (拓扑)确定比赛名次 -- hdu -- 1285

    http://acm.hdu.edu.cn/showproblem.php?pid=1285 确定比赛名次 Time Limit: 2000/1000 MS (Java/Others)    Memo ...

  6. 引用数据类型(Scanner类、Random类)

    Scanner类 Scanner类是引用数据类型的一种,我们可以使用该类来完成用户键盘录入,获取到录入的数据. 引用数据类型的使用 与定义基本数据类型变量不同,引用数据类型的变量定义及赋值有一个相对固 ...

  7. Linqpad工具

    下载地址: http://www.linqpad.net/ 可以通过连接数据库,直接测试LINQ语句,并可以转化为Lamda .SQL语句. 非常好用的小工具,记录一下.

  8. file新建文件及文件夹

    1.获取包名的根目录:mRootPath = getFilesDir().getParent(); // ====mRootPath===/data/data/com.yoyu.file  获取SD卡 ...

  9. 在Matlab中安装使用libsvm详细步骤(附图)

    今天自己在matlab中安装libsvm,下面是详细的步骤 1.首先下载libsvmhttp://www.csie.ntu.edu.tw/~cjlin/libsvm/我的matlab版本 R2016a ...

  10. 微信WeixinJSBridge API使用实例

    http://www.jb51.net/article/66642.htm 这篇文章主要介绍了微信WeixinJSBridge API使用实例,本文直接给出HTML代码,代码中包含了很多实用功能,如图 ...