Using Firebase App Distribution service is resulting in app not installed error

15,540

Solution 1

I ran into this issue with a customer and it turned out that she needed to delete the version of the app that was on her phone to get this to work. (It was a previously installed non Firebase version)

Solution 2

The reason of the message "Installation Failed" or "App not installed" can vary, simply because this is the only error you can get while installing your app. I agree that it is not helpful.

However, it is for most cases due to a signing issue. Here are some solutions :

  1. Make sure you used a Release Signed APK for your Firebase Distribution. https://developer.android.com/studio/build/build-variants#signing

enter image description here

  1. When you generate your signed APK, you can choose V1 or V2 signatures. Try using the V1 signature. V2 signature was a feature introduced in Android 7.0 : https://developer.android.com/about/versions/nougat/android-7.0#apk_signature_v2

  2. Make sure your app is signed correctly, by checking the values in your file, app/build.gradle :

    android {
       ...
       defaultConfig {...}
       signingConfigs {
           release {
               storeFile file("myreleasekey.keystore")
               storePassword "password"
               keyAlias "MyReleaseKey"
               keyPassword "password"
           }
       }
       buildTypes {
           release {
               ...
               signingConfig signingConfigs.release
           }
       }
    

    }

Last but not least, make sure that your phone has enough storage to install the app, and that the option "Install from unknown sources" is checked in the settings.

Solution 3

I had the same issue. So I checked the logs and found this when the installation failed:

2019-10-07 10:20:29.941 771-2406/? E/ResolverController: No valid NAT64 prefix (114, <unspecified>/0)
2019-10-07 10:20:30.740 1278-1537/? W/NativeHelper: Failure copying native libraries [errorCode=-113]
2019-10-07 10:20:30.740 1278-1537/? E/PackageInstallerSession: Commit of session 392193568 failed: Failed to extract native libraries, res=-113

So I assumed there had to be something wrong with my APK-file I used. I pressed Build -> Build APK(s) and uploaded that file to Firebase when it was done. I'm not sure I actually went through the build process the first time or just grabbed the apk directly from the build folders. It may have been corrupted or just the wrong one. I recommend just doing the steps one more time and make sure you build the correct one and upload that.

Solution 4

Make sure you are providing a signingConfigs to each of your variants.

add to your app's build.gradle's android tag the following code:

signingConfigs {
    config {
        keyAlias '<YOUR_ALIES>'
        keyPassword '<YOUR_KEY_PASSWORD>'
        storeFile file('<YOUR_KEY_PATH>') // Usually use '../keystore.key'
        storePassword '<YOUR_STORE_PASSWORD>'
    }
}

Finally, add the following line into each variant in your buildTypes in your app's build.gradle :

signingConfig signingConfigs.config

Hope this helps.

Solution 5

This is a random error (apparently).

What worked for me was manually deleting the build folder inside the app module (simply cleaning the project does not delete all the compiled code), build the APK again, re-upload it on FAD and then the APK installed successfully.

Share:
15,540
mumayank
Author by

mumayank

Updated on June 07, 2022

Comments

  • mumayank
    mumayank about 2 years

    I'm using the Firebase app distribution service for the Android platform. For automatic distributions, I've set up the Gradle file according to the steps mentioned in the docs. The setup and auth are successful. The distribution is also successful. But once I download the app using Firebase's App Tester app for Android, it results in app not installed error. This is for both: debug as well as release variant.

    I tried installing the app after disabling the Google play protect, but the issue remains. Can someone please help me regarding this?

    enter image description here

    enter image description here

    enter image description here

    enter image description here

  • mumayank
    mumayank over 4 years
    Thank you for the response. But no, I don't have the app already installed on the target device.
  • ElliotM
    ElliotM about 4 years
    This is the correct answer here. You don't want your QA/internal testers to need to uninstall each time. Simply sign the distributed version with your current keystore file or a new one - it doesn't matter.
  • Gridcell Coder
    Gridcell Coder about 4 years
    For flutter users signing the app using this flutter.dev/docs/deployment/android worked for me
  • mumayank
    mumayank almost 4 years
    Very good answer detailing out the possible reasons
  • Bill Mote
    Bill Mote almost 4 years
    I've run into this before, but I currently have a situation where this does not resolve the problem.
  • iaforek
    iaforek almost 3 years
    I had a similar issue. There was previous snapshot version installed and while updating the app via App Tester I've got the meaningless: Installation Failed error. In my case I had to do two steps: uninstall previously installed app AND reboot the phone. Next, I was able to update the app via App Tester.