错误弹窗如图:

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. python 基础_列表的其他操作 4

    一.查找某个元素在数组中出现的次数 ,count的运用 a = ['a','b','c','c','c','a'] print(a.count('c')) 二.把一个元素插入到另一个元素的末尾,ext ...

  2. VIP之CVI CVO

        3. VIP CVI CVO   在开始时,对于CVI和CVO是不知道应该怎样去调试的,就是不知道应该从哪里去确认是对还是错. 关于这一点从再次看到关于数据包的格式才明朗的.去分析CVI和输出 ...

  3. Iframe跨域JavaScript自动适应高度

    重点分析: 主域名页面:页面A,页面C 其它域名页面:页面B 步骤: 1.页面A(主域名)通过Iframe(id="iframeB")嵌套页面B(其它域名) 2.页面B(其它域名) ...

  4. $.contains(a,b)

    jQuery.contains()函数用于判断指定元素内是否包含另一个元素. 简而言之,该函数用于判断另一个DOM元素是否是指定DOM元素的后代. 该函数属于全局jQuery对象. 语法 jQuery ...

  5. C++之const限定符(顶层const,底层const)

    作者:tongqingliu 转载请注明出处:http://www.cnblogs.com/liutongqing/p/7050815.html C++之const限定符(顶层const,底层cons ...

  6. Learning Emacs

    一.退出和缩小emacs C-x C-c C-z 二.打开和关闭文件 C-x C-f C-x C-c 三.移动 C-b 后退 C-p 向上 C-n 向下 C-f 向前

  7. Java学习--数组的定义和使用

    1. 数组分配了空间,未赋值 public class ArrayDemo01{ public static void main(String args[]){ int score[] = null ...

  8. Python自动化开发 - 装饰器

    本节内容 一.装饰器导引 1.函数对象特性 2.扩展业务功能需求 3.各种解决方案 二.装饰器解析 1.装饰器基本概念 2.无参装饰器解析 一.装饰器导引 1.函数对象特性 #### 第一波 #### ...

  9. cxGrid 怎样才能让不自动换行 WordWrap:=false

    cxGrid 怎样才能让不自动换行 WordWrap:=false 2014-12-26 02:04:03|  分类: delphi|举报|字号 订阅     下载LOFTER我的照片书  |     ...

  10. NODE-WEBKIT教程(5)NATIVE UI API 之FRAMELESS WINDOW

    node-webkit教程(5)Native UI API 之Frameless window 文/玄魂 原文链接:http://www.xuanhun521.com/Blog/2014/4/15/n ...