I am using Android Studio 2.2 Preview. I am facing the issue
Failure: Install failed invalid apk
Error: While installing apk,
If Emulator is opened, please close it.
And Restart the android studio.It worked for me.
Give a try.
Go to
File->settings->Buil,Execution,Deployment->Instant Run->Disable it.
//now you are good to go.
In lollipop and above versions Android introduced multiple users, When you delete an app it still exists in device. Please make sure your app is deleted from all users and then reinstall it.
You can check by going to Settings->Apps->All and check your app in the list, On selecting your app tap on more button in actionbar and select uninstall for all users.
This worked for my xiaomi redmii note 4 after allowing developer options and allowing USB debugging go to settings-> developer options-> uncheck Turn on MIUI optimization Restart your device and now install the app.
Disable Instant Run. Steps in Android Studio
Goto
1. File -> setting(or CLRT+ALT+S)
2. Build, Execution, Deployment -> Instant Run
3. Disable Instant Run
step by step (windows)
step 1 : Go to file -> settings
step 2 : Build, Execution, Deployment -> Instant Run
step 3 : disable the instant values
step 4 : finally disable the Instant Run
In my case clean project and rebuild works, no need to disable instant run and restart.