skip to Main Content

Hey I am working with Flutter, My AndroidManifest.xml looks like this. Not able to get merged manifest in android studio. Can you help me in finding out where am I missing exported=" true", Playstore is not allowing me to update the app?

I tried to update all the dependencies in pubspec.yaml but nothing helped. Checking each library for the manifest file is time-consuming. How can I detect which library manifest file needs to be changed?

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="org.grow90.whatsub">
    <uses-permission android:name="android.permission.READ_SMS"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission
        android:name="android.permission.PACKAGE_USAGE_STATS"
        tools:ignore="ProtectedPermissions" />
   <application
        android:label="SubSpace"
        android:icon="@mipmap/ic_launcher">
       <meta-data android:name="com.google.android.geo.API_KEY"
           android:value=""/>
        <activity
            android:name=".MainActivity"
            exported="true"
            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="com.google.firebase.messaging.default_notification_icon"
                android:resource="@drawable/ic_stat_onesignal_default" />
<!--            -->
<!--            <meta-data-->
<!--                android:name="com.onesignal.messaging.default_notification_icon"-->
<!--                android:resource="@mipmap/ic_stat_onesignal_default" />-->

<!--            <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>
        </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>
    <uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
    <uses-permission android:name="android.settings.APPLICATION_DETAILS_SETTINGS"></uses-permission>
</manifest>

2

Answers


  1. If you are targeting android 12 or 12+ you must specify "android:exported" property to specify whether or not components of other applications can invoke the service or interact with it — "true" if they can, and "false" if not. When the value is "false"

    Default value for this attribute is set to false.

    So, if you have any activity, alias, service or broadcast receiver with intent-filter registered in your android manifest file then you must specify the "android:exported" attribute to continue.

    Login or Signup to reply.
  2. I updated exported="true" for <activity tag

    But issue not resolved.

    In my case I was using firebase_messaging & flutter_local_notifications package. I tried to upgrade it but still facing issue.
    Temporarily I commented both package, clean/build app and uploaded to Play Store. It got accepted without any issue.

    Planned notification and messaging in next version.

    Look for packages what makes issue then act accordingly instead of random search.

    Thanks!

    Dee

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search