Error while installing release version of Flutter app on Android 12 : "Parse Error : There was a problem parsing the package"

Viewed 5619

I have a Flutter app, working properly on multiple Android and iOS devices. Recently I found it's release version APK can't be installed on Pixel phone having Android 12, I receive this error :

Parse Error : There was a problem parsing the package

(I am using Flutter 2.5.3, current latest version)

5 Answers

In Android 12 and later any launchable activity should contain this flag in manifest :

exported="true"

use

android:exported="true"

on activity follow the image

enter image description here

please install android SDK 30 in android studio

if you are using razorpay in your project then you will have to add these lines in your manifest-

  <receiver
            android:name="com.razorpay.RzpTokenReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="rzp.device_token.share" />
            </intent-filter>
        </receiver>

        <activity
            android:name="com.razorpay.CheckoutActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:exported="true"
            android:theme="@style/CheckoutTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <data
                    android:host="rzp.io"
                    android:scheme="io.rzp" />
            </intent-filter>
        </activity>
Related