jonasbark / flutter_stripe_payment

[DISCONTINUED] A flutter plugin with stripe payment plugin integration
MIT License
307 stars 243 forks source link

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported #345

Closed Harjinderbains01 closed 1 year ago

Harjinderbains01 commented 2 years ago

Facing issues while publishing app.

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported

samuel-kings commented 2 years ago

Facing issues while publishing app.

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported

Please were you able to solve this issue

Harjinderbains01 commented 2 years ago

No i couldn't solve this issue.

On Tue, May 31, 2022, 12:44 AM Kings-Samuel @.***> wrote:

Facing issues while publishing app.

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported http://developer.android.com/about/versions/12/behavior-changes-12#exported

Please were you able to solve this issue

— Reply to this email directly, view it on GitHub https://github.com/jonasbark/flutter_stripe_payment/issues/345#issuecomment-1141425331, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARYTXE7WGEIKUCIBAW4JDSLVMUHQZANCNFSM5OBQCAXA . You are receiving this because you authored the thread.Message ID: @.***>

I didn't get any solution so I integrated another Payment gateway

samuel-kings commented 2 years ago

You will simply have to target android 11 (compile and target version 30 instead of 31 in your build.gradle file) Then downgrade all your plugins to the versions they were at almost 8-10 months ago before android 12 was launched.

Let me know if this works for you

On Tue, May 31, 2022, 09:30 Harjinder Bains @.***> wrote:

No i couldn't solve this issue.

On Tue, May 31, 2022, 12:44 AM Kings-Samuel @.***> wrote:

Facing issues while publishing app.

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported < http://developer.android.com/about/versions/12/behavior-changes-12#exported

Please were you able to solve this issue

— Reply to this email directly, view it on GitHub < https://github.com/jonasbark/flutter_stripe_payment/issues/345#issuecomment-1141425331 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ARYTXE7WGEIKUCIBAW4JDSLVMUHQZANCNFSM5OBQCAXA

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/jonasbark/flutter_stripe_payment/issues/345#issuecomment-1141835347, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASV3EZMZ6ESJFYI2MHSTCRDVMXE35ANCNFSM5OBQCAXA . You are receiving this because you commented.Message ID: @.***>

surbhiimmersive commented 1 year ago

I am facing same error and I am unable to change all compile and target version 30. Any other solution from your side ?

AlexBarzoiu commented 1 year ago

I have the same error. Any updates?

I forked the package and tried to add in AndroidManifest.xml file android:exported="true" everywhere, but without result.

I need to update an app on google play, but they don't let me because i am targeting sdk 30. And with sdk 31 this error appears.

FilledStacks commented 1 year ago

I solved this issue by adding the following inside the application tag. This will override all activity items that are not adding the export attribute.

  <activity
            android:name="com.stripe.android.view.Stripe3ds2CompletionActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentSheetActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentOptionsActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.googlepay.StripeGooglePayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.view.PaymentRelayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.payments.StripeBrowserLauncherActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.stripe3ds2.views.ChallengeActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.stripe3ds2.views.ChallengeProgressActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.view.Stripe3ds2CompletionActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentSheetActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentOptionsActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.googlepay.StripeGooglePayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
jenow commented 1 year ago

@FilledStacks you saved my day as of today Android Google play store only accepts sdk version 31+

shaileshpendams commented 1 year ago

I finally fixed this issue in this blog solved with cordova-custom-config [](url)

Djamel96 commented 1 year ago

I solved this issue by adding the following inside the application tag. This will override all activity items that are not adding the export attribute.

  <activity
            android:name="com.stripe.android.view.Stripe3ds2CompletionActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentSheetActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentOptionsActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.googlepay.StripeGooglePayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.view.PaymentRelayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.payments.StripeBrowserLauncherActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.stripe3ds2.views.ChallengeActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.stripe3ds2.views.ChallengeProgressActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.view.Stripe3ds2CompletionActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentSheetActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentOptionsActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.googlepay.StripeGooglePayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

This worked for me. But i had to add xmlns:tools="http://schemas.android.com/tools" to <manifest xmlns:android= Manifest file so in the header of Mainifest should be like this <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.packagename">

Harjinderbains01 commented 1 year ago

I solved this issue by adding the following inside the application tag. This will override all activity items that are not adding the export attribute.

  <activity
            android:name="com.stripe.android.view.Stripe3ds2CompletionActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentSheetActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentOptionsActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.googlepay.StripeGooglePayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android" />
        <activity
            android:name="com.stripe.android.view.PaymentRelayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.payments.StripeBrowserLauncherActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.stripe3ds2.views.ChallengeActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.stripe3ds2.views.ChallengeProgressActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

        <activity
            android:name="com.stripe.android.view.Stripe3ds2CompletionActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentSheetActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.paymentsheet.PaymentOptionsActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />
        <activity
            android:name="com.stripe.android.googlepay.StripeGooglePayActivity"
            android:exported="false"
            tools:node="merge"
            tools:overrideLibrary="com.stripe.android"  />

@FilledStacks Thank you so much. It works, you have provided the best solution.

krishnapriya-acube commented 1 year ago

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.connect_one">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<queries>
<intent>
    <action android:name="android.speech.RecognitionService" />
</intent>
</queries>

<application android:label="Venad" android:icon="@mipmap/ic_launcher"> <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" android:exported="true"

        <meta-data
          android:name="io.flutter.embedding.android.NormalTheme"
          android:resource="@style/NormalTheme"
          />

        <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>
    <activity
        android:name="com.yalantis.ucrop.UCropActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar"

    />

   <activity android:name=".P2PActivity"
       android:theme="@style/Theme.P2PSampleApp"

       />

   <meta-data
       android:name="flutterEmbedding"
       android:value="2" />
   <meta-data
       android:name="com.google.firebase.messaging.default_notification_channel_id"
       android:value="Connect_One" />
   <service android:name=".MeetingService"
       android:foregroundServiceType="camera|microphone"
       android:stopWithTask="true"/>

    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
</application>

this is my Android.xml file when i upload to the play store got an error that,You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported