You Uploaded an APK or Android App Bundle Which Has an Activity, Activity Alias, Service or Broadcast Receiver with Intent Filter, But Without the 'An

Uploaded an APK which has an activity, activity alias, service or broadcast receiver with intentfilter, but without 'android : exported' property set

I added android:exported="true" to my main activity, but that didn't fix the issue for me.

However, I suspected this is a change that some packages have only recently implemented. I checked my pub outdated, and had a few older versions of key packages (in my case I was a major version behind on Firebase storage). Once I had updated to the latest possible versions in file pubspec.yaml the compiled file was accepted on upload to the Google Play.

Uploaded an APK which has an activity, activity alias, service or broadcast receiver with intentfilter, but without 'android : exported' property set

I added android:exported="true" to my main activity, but that didn't fix the issue for me.

However, I suspected this is a change that some packages have only recently implemented. I checked my pub outdated, and had a few older versions of key packages (in my case I was a major version behind on Firebase storage). Once I had updated to the latest possible versions in file pubspec.yaml the compiled file was accepted on upload to the Google Play.

Flutter: You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter,

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.

uploading bundle in play store getting error

There is an easy fix to this which is setting the max supported version with 30 instead of 31 in your build.gradle file/files

However to support 31:
From the documentation

**If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components.
If the app component includes the LAUNCHER category, set android:exported to true. In most other cases, set android:exported to false.
**

<service android:name="com.example.app.backgroundService"
android:exported="false">
<intent-filter>
<action android:name="com.example.app.START_BACKGROUND" />
</intent-filter>
</service>

PS: I would suggest using the canary version of android studio and build your project because it's listing would show you the errors in the manifest.

Flutter/Android: You uploaded an APK which has activity [...] but without the 'android:exported' property. exported=true not working

What is exported receiver?

android:exported. Whether the broadcast receiver can receive messages from non-system sources outside its application — ” true ” if it can, and ” false ” if not.

You need to add the exported attribute for each of the activity pages in your AndroidManifest.xml file.

Example :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nisaefendioglu.weather">

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:usesCleartextTraffic="true"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat">
<activity android:name="com.nisaefendioglu.weather.view.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>


Related Topics



Leave a reply



Submit