Closed Borys520 closed 3 months 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.
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:
superwallkit_flutter
local pub cache and open it's build.gradle
~/.pub-cache/git/Superwall-Flutter-3636b62ea8abe21afddf3c3d2b14df08dcf429fa/android/build.gradle
compileSdk
from 33 to 34flutter build apk —release
should complete successfully. 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.
thanks, this workaround worked for me
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.
What went wrong: Execution failed for task ':superwallkit_flutter:verifyReleaseResources'.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:4: AAPT: error: resource android:color/system_error_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:5: AAPT: error: resource android:color/system_error_container_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:6: AAPT: error: resource android:color/system_on_surface_light not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:7: AAPT: error: resource android:color/system_primary_light not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:8: AAPT: error: resource android:color/system_surface_light not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:9: AAPT: error: resource android:color/system_on_background_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:10: AAPT: error: resource android:color/system_on_error_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:11: AAPT: error: resource android:color/system_on_error_container_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:12: AAPT: error: resource android:color/system_on_primary_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:13: AAPT: error: resource android:color/system_on_primary_container_dark not found.
ERROR: /Users/boryskusmirek/Documents/dev/test2/build/superwallkit_flutter/intermediates/merged_res/release/mergeReleaseResources/values-v34/values-v34.xml:14: AAPT: error: resource android:color/system_on_secondary_dark not found."
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!