superwall / Superwall-Flutter

Remotely configure every aspect of your paywall and double your revenue.
MIT License
9 stars 5 forks source link

Execution failed for task ':superwallkit_flutter:verifyReleaseResources'. #15

Open Borys520 opened 4 days ago

Borys520 commented 4 days ago

Hi all, I added "superwallkit_flutter: ^1.1.9" to my project, but I'm still encountering the following error when running "flutter build apk --release". (on debug it works normal) I also tried this on a newly created project, and the same issue occurred. Below are the error details and the output from flutter doctor.

Im using gradle 8.4, kotlin 1.9.23, minSdk-26, compileSdk-34

ERROR:"FAILURE: Build failed with an exception.

flutter doctor: [✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-PL) • Flutter version 3.22.2 on channel stable at /Users/user/Documents/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 761747bfc5 (3 weeks ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/user/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Utilities/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1) • Android Studio at /Applications/Utilities/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 17.0.10+0-17.0.10b1087.21-11609105)

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

[✓] Connected device (4 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.5 23F79 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.126

[✓] Network resources • All expected network resources are available.

• No issues found!

lukemmtt commented 3 days ago

Inexplicably, I have the same issue on my device, but my CI environment completes the release build with no issue at all (it's live on the Google Play Store). Investigating now.

lukemmtt commented 3 days ago

I cannot fathom why this works on CI but not locally, but after a lot of digging, I did find a workaround to get the local release build to compile: Manually modifying the local superwallkit_flutter build.gradle file and changing the defined compileSdk from 33 to 34.

Specifically:

Two main resources I found that led me to this workaround:

Considering that the Superwall Android SDK has its compileSdk set to 34, I'm guessing this was just an oversight in the recent PR, Update Android SDK and minimal supported versions #11.

Borys520 commented 3 days ago

thanks, this workaround worked for me