错误弹窗如图:

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. silverlight导出图片文件

    新建一个Silverlight应用程序,添加下面两个控件: image控件:image1: Button控件:Click="Button1_Click"; code-Behind代 ...

  2. (转)ASP.NET(C#)FileUpload实现上传限定类型和大小的文件到服务器

    上传文件有两个主要的目的地,一个是服务器,另一个是数据库,ASP.NET内置了FileUpload这个上传控件,文本框显示用户选择的文件的全名. 其属性主要包括: ContenLength:上传文件大 ...

  3. npp 文本编辑器 开源

    下载地址 https://notepad-plus-plus.org/download/v6.8.4.html

  4. checked 选择框选中

    移除属性,两种方式都可 $browsers.removeAttr("checked"); $browsers.attr("checked",false); // ...

  5. 周鸿祎与85后的座谈(一):人人需要Mentor,世界没有奇迹

    我们公司现在有将近 4000 人,我觉得里面肯定是卧虎藏龙.百里挑一的话,也有 40 个伟大的人才.但是,即使是天才,如果没有前辈的帮助,最后也会变成庸才,是做不出什么大事的.举例来说,每一个跳水冠军 ...

  6. POJ2566 Bound Found 2017-05-25 20:05 32人阅读 评论(0) 收藏

    Bound Found Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4056   Accepted: 1249   Spe ...

  7. hdu 4983 线段树+斐波那契数

    http://acm.hdu.edu.cn/showproblem.php?pid=4893 三种操作: 1 k d, 修改k的为值增加d 2 l r, 查询l到r的区间和 3 l r, 从l到r区间 ...

  8. [ X.XX]CF每日一题系列线下更新中

    现在做的都好水啊,就不写博客了,线下有记录滴

  9. mysql 幻象读

    [sql] view plain copy CREATE TABLE `t100` ( `id` bigint(20) NOT NULL default '0', `value` varchar(32 ...

  10. python 使用json格式转换

    什么是json: JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式.易于人阅读和编写.同时也易于机器解析和生成.它基于JavaScript Programm ...