Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deployed Flutter application to Google Play Store but it's stuck at the splash screen

Deployed Flutter application to Google Play Store but it's stuck at the splash screen and never open I did match my AppID and still facing the same issue

Here is my manifest.xml:

<!-- TODO: Changed by Parveen Before merge 1 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mrbox.store">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!--
    io.flutter.app.FlutterApplication is an android.app.Application that
    calls FlutterMain.startInitialization(this); in its onCreate method.
    In most cases you can leave this as-is, but you if you want to provide
    additional functionality it is fine to subclass or reimplement
    FlutterApplication and put your custom class here.
    -->
    <!-- TODO: Add By Parveen before merge 1 -->
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="Mr.Box Store"
        android:usesCleartextTraffic="true"
        android:icon="@mipmap/launcher_icon">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!--
            Specifies an Android theme to apply to this Activity as soon as
            the Android process has started. This theme is visible to the user
            while the Flutter UI initializes. After that, this theme continues
            to determine the Window background behind the Flutter UI.
            -->
            <meta-data
                android:name="io.flutter.embedding.android.NormalTheme"
                android:resource="@style/NormalTheme"
                />
            <!--
            Displays an Android View that continues showing the launch screen
            Drawable until Flutter paints its first frame, then this splash
            screen fades out. A splash screen is useful to avoid any visual
            gap between the end of Android's launch screen and the painting of
            Flutter's first frame.
            -->
            <meta-data
                android:name="io.flutter.embedding.android.SplashScreenDrawable"
                android:resource="@drawable/launch_background"
                />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="FLUTTER_NOTIFICATION_CLICK" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <!--
            TODO: Changed by parveen before merge 1
            android:name="default-url"
            android:value="https://inspireui.com"
            -->
            <meta-data
                android:name="default-url"
                android:value="https://www.mrboxstore.com" />
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- TODO: Changed by parveen before merge 1 android:value="inspireui.com" -->
                <data android:scheme="https"
                    android:host="mrboxstore.com" />
                <data android:scheme="http" />
            </intent-filter>
        </activity>
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@drawable/logo" />
        <!--
        Set color used with incoming notification messages. This is used when no color is set for the incoming
        notification message. 
        -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_color"
            android:resource="@color/notiColor" />
        <!-- Google map and Admod setup -->
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/api_key" />
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="@string/admob_api" />
        <!-- Facebook Login configuration -->
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:exported="true" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>
        <!--
        Don't delete the meta-data below.
        This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
        -->
        <meta-data android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>
like image 536
mohammed fahmy Avatar asked Feb 21 '21 05:02

mohammed fahmy


People also ask

How do I get rid of the splash screen in flutter?

Go to flutter –> open ios module on Xcode. On Xcode window, Click on Runner-> Runner -> Assets. xcassets folder. Here you can see LaunchImage paste your splash screen image with all three different dimensions in this folder.


Video Answer


4 Answers

Things to try

  1. Make sure flutter doctor -v runs without ANY complaints
  2. Edit android/gradle.properties and add the flag: android.bundle.enableUncompressedNativeLibs=false
  3. Do a flutter clean command
  4. Try creating a release build using flutter build appbundle

Test Locally / Offline

  1. download bundletool
  2. Generate a set of APKs from your app bundle, following this guide
  3. Deploy the app to your connected device(s) following this Guide

Works?

  1. Upload your bundle to Google Play using the internal test track, or the alpha or beta channels to test the bundle before releasing it in production Instructions for doing this can be found here

  2. Good Luck :)

like image 150
C. Sederqvist Avatar answered Oct 22 '22 15:10

C. Sederqvist


Because it is not working after uploading on google play. then there might be some issue with your app signing. You can follow the steps here

like image 20
Shriya Pandya Avatar answered Oct 22 '22 15:10

Shriya Pandya


I have faced issues like this when I used facebook login sdk, so I would suggest checking following:

  1. Check if you have signed the apk/appbundle with proper release keystore

  2. Check if you have opt in for google's automatic signing on playstore while deploying app

    2.1 If yes then it will change the sha-1 value which is used in facebook app for authentication, for it to work use the one generated by google in playstore

like image 1
Harshvardhan Joshi Avatar answered Oct 22 '22 16:10

Harshvardhan Joshi


Assuming that you publish an App Bundle (.aab file) the issue can be related to the format itself since it is not testable via IDE. E.g. when running the app in Release mode on a device .apk is created and provisioned to it, not .aab.

What I did in the past to troubleshoot .aab (also had failures only with GPlay version, local Debug and Release modes worked fine) was to use Firebase Test Lab. You can run automated monkey tests on 5 physical devices and 15 virtual devices every day free-of-charge. Just log in to Firebase Console, cretae an empty project, go to Test, upload your .aab file, select devices (it's worth also to choose different locales) and wait for completion. After that check logs in test results, you might find answers there (in my cases there was an issue with localization resources which got broken while producing .aab release package).

This option can be esier/faster than splitting .aab locally with comand line into APKs and testing on a local device.

like image 1
Maxim Saplin Avatar answered Oct 22 '22 15:10

Maxim Saplin