Search code examples
androidfluttergoogle-playgoogle-play-consoleandroid-app-bundle

Flutter-built Android app bundle is "not available for your device" but APK works fine


If I create an APK using flutter build apk, I can install and run my Flutter application (which is more or less the basic app template with a few charts added), but if I follow the steps to publish the Android app using flutter build appbundle, and add it to an internal test in Google Play Console, then everything is smooth (signing works, the Google Play Console "real devices" tests run without errors) until I try to install the app; here, I'm told that my devices are compatible (and indeed they show up as compatible on the very long list on Google Play Console), yet I'm told that "This app is not available for your device".

Other testers in the same geographical region (and, again, the automated "real device" tests) can install the app just fine, so it's not something fundamental about the app, and probably not Flutter's fault, so what can be the cause of this?

I've cross-posted this question as a Flutter GitHub issue.


Solution

  • I managed to get around this and recorded the steps as a comment on the GitHub issue, reproducing it here for reference:

    I managed to resolve the issue through this truly bizarre sequence of steps:

    1. Create a new Google Play account (actually using this new account would be a showstopper, so we don't want to do that at the end of the day, but we'll get there).
    2. Invite the new account to the internal test.
    3. Log into the new account on the phone.
    4. Access the internal test through one of the version-specific links, hidden somewhere in the depths of Google Play Console (e.g. https://play.google.com/apps/test/dk.fuglede.electricity_prices/5).
    5. This time around there is an install button. Clicking it, however, prompts me to verify my age. Click the link to verify my age.
    6. This opens a browser which (since I used Google Play from the browser with my previous account) importantly is logged into my old account.
    7. Complete the verification (I used the credit card option which was particularly painful since most cards are debit cards around here).
    8. Go back to Google Play and laugh at the fact that the new account still doesn't have it's age verified since we accidentally did it for the old account.
    9. Switch account back to the old one.
    10. Everything works now.

    So, I suppose the issue was that the existing account didn't have its age verified, but a rather terrible bug in Google Play wouldn't ever tell me what the problem was, or allow me to do anything about it without creating a new account.