AVEbrahimi
AVEbrahimi

Reputation: 19154

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

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)

Upvotes: 15

Views: 9812

Answers (5)

DiLDoST
DiLDoST

Reputation: 372

As @Avebrahimi said (Try him first)

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

android:exported="true"

Didnt work?

But, still in many cases it doesn't works. So if it doesn't works, try to sign your app with a custom key, instead of default test key. It worked for me

Upvotes: 0

rajdeep shah
rajdeep shah

Reputation: 49

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>

Upvotes: 0

Rasel Khan
Rasel Khan

Reputation: 4249

use

android:exported="true"

on activity follow the image

enter image description here

Upvotes: 15

AVEbrahimi
AVEbrahimi

Reputation: 19154

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

exported="true"

Upvotes: 30

MD sajjat
MD sajjat

Reputation: 11

please install android SDK 30 in android studio

Upvotes: 1

Related Questions