热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

消息无效文件的安装失败-InstallationfailedwithmessageInvalidFile

InstallationfailedwithmessageInvalidFile:K:\project\app\build\intermediates\split-apk\with_

Installation failed with message Invalid File: K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

安装失败的消息无效文件:K:\项目\应用程序\build\ \ \ \ \ \程序\ spliates -apk\with _imageprocessor \debug\slice \slice \ slice_slice_0.apk。有可能通过卸载apk的现有版本来解决这个问题,然后重新安装。

WARNING: Uninstalling will remove the application data!

警告:卸载将删除应用程序数据!

Do you want to uninstall the existing application?

要卸载现有的应用程序吗?

i am running my project in android studio 2.3 beta 3 .

我在android studio 2.3 beta 3中运行我的项目。

13 个解决方案

#1


191  

Click Build tab ---> Clean Project

点击Build tab ---> Clean项目。

Click Build tab ---> Build APK

单击Build选项卡——> Build APK

Run.

运行。

#2


72  

I found the solution go to

我找到了解

settings>build,execute,deployment>instant run>Enable instant run to hot swap code /resource change on deploy(unchecked this option)

设置>构建、执行、部署>立即运行>允许立即运行到部署上的热交换码/资源更改(未选中此选项)

`

#3


25  

Just follow two steps

跟着两个步骤

Step 1 : Build---> Clean

步骤1:构建—清理>

Step 2 : Build--> Build APK

步骤2:构建——>构建APK

Hope it works. Good luck guys

希望它的工作原理。祝你好运伙计

#4


16  

I solved it this way:

我是这样解决的:

Click Build tab ---> Clean Project

点击Build tab ---> Clean项目。

Click Build tab ---> Rebuild Project

单击Build选项卡——>重建项目

Click Build tab ---> Build APK

单击Build选项卡——> Build APK

Run.

运行。

#5


13  

First, as already mentioned, try cleaning and rebuilding the project. If that does not work for you, try this:

首先,如前所述,尝试清理和重建项目。如果这对你不起作用,试试这个:

Settings > Build, Execution, Deployment: Un-check Enable Instant Run to hot swap code...

设置>构建、执行、部署:取消检查允许立即运行到热交换代码…

This solved the problem right away for me.

这立刻就解决了我的问题。

P.S. I posted this answer since it's 2017 and I don't think this feature existed in 2014, so it wouldn't cause this problem.

附注:我是在2017年发布这个答案的,我认为这个功能在2014年不存在,所以不会引起这个问题。

#6


9  

Please follow the below steps File > Settings > Build,Execution,Deployment > Instant Run > Un-check (Enable Instant Run to hot swap code)

请按照以下步骤文件>设置>构建、执行、部署>即时运行> uncheck(启用即时运行至热交换代码)

this is working for me

这对我很有效

thanks

谢谢

#7


7  

This happened with me when I copied a project code from one laptop to another one and tried running the project. What fixed this for me was:

当我将项目代码从一台笔记本电脑复制到另一台笔记本电脑并尝试运行该项目时,这种情况就发生了。对我来说,解决这个问题的方法是:

  1. Delete the project's build folder
  2. 删除项目的构建文件夹。
  3. Clean Project
  4. 清洁项目
  5. Build project
  6. 建设项目
  7. Run
  8. 运行

#8


1  

Try this in gradle project dependencies { classpath 'com.android.tools.build:gradle:2.2.3' }

在第一级项目依赖项{类路径'com.android.tools.build:gradle:2.2.3'}中尝试这个

#9


1  

In my case, I had the same issue when the name of my project contains a "&" sign.The solution is to rename the project name,from file browser, so it doesn't contain any "&" signs and then from:

在我的例子中,当我的项目名称包含一个“&”符号时,我遇到了同样的问题。解决方案是从文件浏览器重命名项目名称,不包含任何“&”符号,然后从:

  • Build menu-> Clean Project
  • 建立菜单- >清洁项目
  • Build menu-> Build APK
  • 构建菜单- >构建APK

I've tested it two times and it worked just fine.

我测试了两次,效果很好。

#10


1  

In my case , there was a single qutation " ' " in project directory and after removing it resolved

在我的例子中,在项目目录中有一个qutation“'”,在删除后得到解决

#11


0  

For me it's:

对我来说:

Click Build tab ---> Clean Project

点击Build tab ---> Clean项目。

Rebuild Project

重建项目

Build APK

构建的APK

#12


0  

Delete the Intermediate folder after then run the project is working fine actually that APK builds to another system. Go to app/build/intermediates.

然后运行后删除中间文件夹,该项目实际上运行良好,APK构建到另一个系统。应用程序/构建/中间体。

#13


-1  

Try cleaning the project and rebuild, if doesn't work try disabling the Instant Run from Settings>Build>Instant Run in case you are running someone else's code.

尝试清理项目并重新构建,如果不工作的话,试着禁用从设置>构建>的即时运行,以防你在运行别人的代码。


推荐阅读
author-avatar
紫云轻梦lyq
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有