I’m working on a Flutter project with the following setup:
Flutter version: 3.24.1
Android compileSdkVersion: 34 (to meet Google Play Store requirements)
Package: pusher_channels_flutter: ^2.2.1
I’m able to build the app in debug mode without any issues, but when I try to build the app in release mode, I get the following error:
`FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:pusher_channels_flutter:verifyReleaseResources’.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR: E:Git RepoRAQIdelivery_appbuildpusher_channels_flutterintermediatesmerged_resreleasemergeReleaseResourcesvaluesvalues.xml:194: AAPT: error: resource android:attr/lStar not found.`
What I’ve Tried:
- Verified that my
compileSdkVersion
is set to 34. - Cleaned and rebuilt the project with
flutter clean
andflutter pub get
. - Ensured that all my dependencies are up-to-date.
Additional Information:
- The error only occurs in release mode. The app runs fine in debug mode.
- My Flutter project includes the
pusher_channels_flutter
package, which I suspect may be causing this issue. - Kotlin version is 2.2.20 (latest)
- I need to keep `compileSdkVersion at 34 due to Play Store requirements.
Question:
Has anyone encountered a similar issue with the android:attr/lStar resource not being found during the release build process? Is there a workaround to resolve this issue while keeping compileSdkVersion
at 34?
Any guidance would be appreciated. Thank you!
4
I have faced the same issue, after some diggin into the library I found out that this package depends on outdated maven repo:https://mvnrepository.com/artifact/com.pusher/pusher-java-client
so if you have intensions to keep your project up to date you should use something else since this repo has not been updated since 2022.
UPD: I have checked docs and it says JVM 17 is the latest supported version
UPD: I found solution in some of git threads but lost link to it..
got to .pub-cache->hosted->packages which causes problem and update compile and minimal sdk version. It is not best solution but It’s needed until hoster will update theirs packages