1
votes

I am interesting in create my own android apps, I have create myself a simple BMI calculation apps in school lab and it run successfully. But when I come home and try to run in my own laptop it doesn't run and prompt a message error. Below are the Message error:

Installation failed with message Invalid File: E:\Degree year2sem2\mobile app\Pratical\Pratical2\app\build\intermediates\split-apk\debug\slices\slice_5.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.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?"

btw I am using android studio 3.0 and my school lab is using 2.3, can this be the version problem or anything? thanks if anyone can help out

2
diff pc diff workplace setting.. try to click on clean project and rebuild projectZeroOne

2 Answers

0
votes

I solved by 3 steps:

1)Click Build tab -> Clean Project

2)Click Build tab -> Rebuild Project

3)Click Build tab -> Build APK

If that does not work,try

Settings > Build, Execution, Deployment>Instant Run>Enable Instant Run to hot swap code(Uncheck this)

0
votes

Its because you are trying to run a part of the apk.

When you run your code android studio will create multiple slice of your application for faster running called Instant run.

Build > Clean Project

Will remove all the slice apk from your local file.

Then run again