PurpleSoftSrl / sumup_flutter_plugin

A Flutter wrapper to use the SumUp SDK. With this plugin, your app can easily connect to a SumUp terminal, login and accept card payments on Android and iOS.
https://www.purplesoft.io
MIT License
17 stars 17 forks source link

Build for Android "targetSdkVersion 31" produces error "android:exported needs to be explicitly specified for <activity>" #22

Closed d-wolf closed 1 year ago

d-wolf commented 2 years ago

If i do compile my project with target SDK version 31, the build fails with the following error:

android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See [https://developer.android.com/guide/topics/manifest/activity-element#exported]() for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See [https://developer.android.com/guide/topics/manifest/activity-element#exported]() for details.

If i remove the sum-up package, everything works fine. Could you please fix this issue by updating the package?

Best regards,

Daniel

[✓] Flutter (Channel stable, 2.10.2, on macOS 12.2.1 21D62 darwin-x64, locale en-DE)
    • Flutter version 2.10.2 at /Users/danielwolf/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 097d3313d8 (2 weeks ago), 2022-02-18 19:33:08 -0600
    • Engine revision a83ed0e5e3
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/danielwolf/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_SDK_ROOT = /Users/danielwolf/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.65.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • Pixel 3a (mobile)        • 94JAY0PRFA                • android-arm64 • Android 12 (API 31)
    • iPhone von Esys (mobile) • 00008030-000235D821A1802E • ios           • iOS 15.3.1 19D52

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
sstasi95 commented 2 years ago

Hi, here is a workaround. SumUp should update their Android SDK.

d-wolf commented 2 years ago

@sstasi95 The workaround works fine. Thank you!