I am using Android Studio to develop this app, and today when I tried to upload it to my device to test I got a popup window saying:
Installation fail
If you're using Android studio 2.0 preview , disable the instant run .
All credit and thanks go for the life saver https://stackoverflow.com/a/34192979/1413998
In my project I got past this by being more specific about which portions of Google Play Services I was linking with. In particular, I changed
dependencies {
...
compile 'com.google.android.gms:play-services:8.4.0'
}
to
dependencies {
...
compile 'com.google.android.gms:play-services-maps:8.4.0'
}
in my app module's build.gradle, since all I was really using was the maps API.
I have tried followings
but nothing work.
However, deleting the actual emulator file did trick for me.
You can find the emulator files at this location.
C:\Users\<username>\.android\avd
Thanks.
I discovered that the dex file was getting larger than the buffer, even though it contained less than 64k methods. Then I enabled ProGuard and it helped a lot reducing the dex file size.
THe application dex-method-counts helps a lot to debug your dex file, by checking not only the number of methods, but to what package they belong
I have also encountered this problem in Android Studio, from version 2.0 Preview 6 all the way up to 2.0 Beta 3 and none of the solutions mentioned here worked for me.
Turned up it had nothing to do with Instant Run. All I had to do was to increase the AVD's Internal Storage until the following notification disappeared. I also had to perform a data wipe after changing the values.
I disabled Instant run for this project, and problem solved.
Maybe it's a bug in the instant run feature of Android studio 2.0 preview.
Instant Run is a new feature introduced in Android Studio 2.0.
ps: in case you don't find Instant run, its in:
Android Studio --> Preferences --> Build, execution, deploy --> Instant run.
or you can search for it in the preferences tab.