Installation failed with message Invalid File

梦想与她 提交于 2019-11-28 02:50:24

Click Build tab ---> Clean Project

Click Build tab ---> Build APK

Run.

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)

`

Just follow two steps

Step 1 : Build---> Clean

Step 2 : Build--> Build APK

Hope it works. Good luck guys

I solved it this way:

Click Build tab ---> Clean Project

Click Build tab ---> Rebuild Project

Click Build tab ---> Build APK

Run.

Hopefully, this should solve your problem.

Do follow the following steps.

1. Clean your Project

2. Rebuild your project

3. Finally Build and Run your project

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.

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

this is working for me

thanks

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. Clean Project
  3. Build project
  4. Run

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

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

For me it's:

Click Build tab ---> Clean Project

Rebuild Project

Build APK

follow some steps:

Clean Project
Rebuild Project
Invalidate Caches / Restart

Now run your project. Hope it will work.

It's work for me.

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

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

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

I found its work by restarting my phone :)

Work for me:

  1. Delete these folders
  2. Run app

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!