• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Application Instalation Failed

robothito

Newbie
Feb 2, 2016
26
3
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!
 
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.
 
Upvote 0
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!
 
Upvote 0
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!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones