[android] Android Studio: Application Installation Failed

I have a Redmi K20, the following is MI, Redmi specific that I learned in a hard way

How I ended up in the error: I uninstalled the debug app from the phone because my assets were not accessible (maybe I had faulty source code)

Solution (steps that worked for me in sequence):

  1. Uninstall the app
  2. As per suggestion above by @Jayaprakash G and all, I turned off MIUI optimization
  3. I tried finding "Instant Run", but seems missing in Android Studio 3.6.2
  4. MI supports "Second Space", switch to it. You'll observe the app is still there. Again uninstall.
  5. Switch space back to original again. By any chance, if you see the same app in frequently used app in the app drawer, again uninstall.
  6. Try to compile and run the app from Android Studio and let it show in the app phone (Error 3 will be still there, but installation will succeed).
  7. Clean the project, close Android Studio
  8. Start Android Studio, now everything will work as normal without the Error 3

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to android-studio

A failure occurred while executing com.android.build.gradle.internal.tasks "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' Flutter plugin not installed error;. When running flutter doctor ADB.exe is obsolete and has serious performance problems Android design support library for API 28 (P) not working Flutter command not found How to find the path of Flutter SDK

Examples related to apk

Application Installation Failed in Android Studio Difference between signature versions - V1 (Jar Signature) and V2 (Full APK Signature) while generating a signed APK in Android Studio? Session 'app': Error Installing APK Android Error Building Signed APK: keystore.jks not found for signing config 'externalOverride' Build and Install unsigned apk on device without the development server? The APK file does not exist on disk Android Studio: Application Installation Failed How to retrieve Key Alias and Key Password for signed APK in android studio(migrated from Eclipse) ADB Install Fails With INSTALL_FAILED_TEST_ONLY Upload failed You need to use a different version code for your APK because you already have one with version code 2