When running the application in Android Studio, you may get trouble in dealing with the error “Unknown Failure: Error while installing apks”. How annoying it is! right? However, take it easy by reading the on-screen instructions shown below.
But before getting started with guidance on how to fix Error While Installing Apk Android Studio, we need to know about Android Studio as well as how it works.
What’s Android Studio?
Android Studio is the official Integrated Development Environment (IDE) specially created for Android development. It is available for download on Windows, macOS and Linux based operating systems.
In a sense, Android Studio is an all-in-one tool for engineers who want to create offerings for the Android platform.
It’s not too much difficult to install an apk file in Android Studio. However, you can download it manually via an emulator.
1. First you need to make sure you have this directory. (X:\Program Files (x86)\Android\android-studio\sdk\platform-tools). If you don’t see this directory in your SDK, launch the SDK and AVD Manager (execute the android tool) and install “Android SDK Platform-tools”
2.Copy APK file into (X:\Program Files (x86)\Android\android-studio\sdk\platform-tools). In this tutorial we will use APK file get from this tutorial. Yes, Candy Crush ?
3.Go to Android Studio > Run Android Virtual Device Manager (AVD) > Start emulator
AS Manual
4.Go to Start > Run > Cmd. then
5.After successfully installed, you will see result in command prompt like below
There are a couple of solutions to solve, Try any of these:
- Just uninstall the apk which you have already installed on your mobile before installing the new apk every time.
- Or you can just ignore that error and press “OK”, nothing bad happens if we ignore it. (i still do this every time it all works fine without any problem)
- Or you need to modify your AndroidManifest.xml, Change android:testOnly=”true” to android:restOnly=”false” or remove this attribute.
Actually what happens behind this is, when the device on which you are trying to install the APK already has an APK of same app installed in your mobile. So the Android Studio needs to uninstall that previous APK and install the latest APK again. To perform this action Android Studio is asking our permission to proceed.
How do I resolve the “Error while installing APKs” error when I used to run a program connecting my phone on Android Studio?
Oh it’s a very common error in Android development( Studio).
A senior Android developer at 4Gbritain.org who provides detailed & useful tutorials & guides for Android and mobile users community. He is familiar with Kotlin, Android Studio, and Android Development ….With a profound passion for innovation, a solid educational foundation, and years of hands-on experience, Hien Pham is here to make a difference in the dynamic world of mobile development.