Apps Application Instalation Failed

robothito

Newbie
When trying to run my application on Android Studio I got the following:



Application Instalation Failed
Installation failed with message null
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!

What does this mean?? What is "APK" (gosh I have always hated acronyms -sigh-)
how do you unistall and reinstall this?


Also before this I got this error in the run tool window
emulator: the memory neede by this AVD exceeds the max specified in your HAXM configuration
HAXM is not working and emulator runs in emulation mode
AVD RAM size= 1536MB
HAXM max RAM sixe = 1024MB
you might want to adjust your AVD RAM size and /or HAXM configuration to run in fast virt mode

I am suspecting it has to do something with the AVD. Cause every time I try to run on something other than A nexus S (Nexus 5 or 9) it doesnt run and the error that I described appears.

With a nexus S the application runs fine..

Any help will be greatly appreciated. Thanks!
 
D

Deleted User

Guest
APK stands for Android Package. It's the bundle of compiled code and resources that makes up your app. The whole lot gets built into a single compressed file, with extension '.apk', which is then installed on your device.

I assume you're using the emulator here. You can uninstall the application as you would normally do it on a real device. Then try a re-install from Android Studio.

Also be aware that your application will be built with a minimum API version. This is configured in the Gradle build file (build.gradle)

Code:
defaultConfig {
    applicationId "xxxxxxxxxxxxxx"
    minSdkVersion 21
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Note in the above, that the minSdkVersion is 21. This means that the app will NOT install on any device (real or virtual), which has an API less than 21. The API for your AVD is set when you create it. Not sure if it can be changed after the AVD is created.

Note also that the terms 'API' and 'SDK' are used interchangeably, just to confuse you some more :)

It could be that your Nexus 5 AVD has an older API. From past experience you do get cryptic errors such as the ones you encountered, when this happens, and the app just fails to install.
 

robothito

Newbie
Thread starter
Thank you for your reply. I think this will give me an opportunity to study more about this APK thing and how to unsinstall it... (I am running on a mac, how do you unsinstall this? killing processes?

btw, I made this work. For anyone who has the same problem I am gonna leave what i did here:

1) Fix the AVD memory problem. You can do it by modifying the HAXM memory but I read this require reinstalling it so I ll leave it for later. What I did was modifying the memory require by the AVD to 1GB using the AVD manager. (Make sure it saves this , I modified this a couple of times until it took efect)

2) Then run the virtual device and leave it there... go grab a cup of coffee (or wash the dinner's dishes:rolleyes:). You have to wait until the device loads in its entirety with the android main screen there (not only the logo). only when that happens run the application, not before.

Thanks again!
 
D

Deleted User

Guest
The APK is the actual app that you install on your phone or AVD. To uninstall an app from the AVD, do exactly the same as you would on a real device.
 

Nadeem Bhat

Lurker
This is also happened to me, so don't worry guys what have to do is just go to the developer options and there enable the "install via USB" if it is enabled then first disable it and then enable it.For that you need Internet Connection.
 

asrianor

Lurker
I'm having the same problem. I have re-installed android studio and do factory reset on smartphone, but still fail. After I flashing my smartphone, fix problem
 

James_Watson

Android Enthusiast
When trying to run my application on Android Studio I got the following:



Application Instalation Failed
Installation failed with message null
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!

What does this mean?? What is "APK" (gosh I have always hated acronyms -sigh-)
how do you unistall and reinstall this?


Also before this I got this error in the run tool window
emulator: the memory neede by this AVD exceeds the max specified in your HAXM configuration
HAXM is not working and emulator runs in emulation mode
AVD RAM size= 1536MB
HAXM max RAM sixe = 1024MB
you might want to adjust your AVD RAM size and /or HAXM configuration to run in fast virt mode

I am suspecting it has to do something with the AVD. Cause every time I try to run on something other than A nexus S (Nexus 5 or 9) it doesnt run and the error that I described appears.

With a nexus S the application runs fine..

Any help will be greatly appreciated. Thanks!
 

jorgenq55

Lurker
Simplemente reinicie mi smartphone y mande a correr de nuevo el programa pidiendome esta vez que digite el patron en mi smartphone y ya funciono!!
 
Top