bugsnag / bugsnag-flutter

BugSnag crash reporting for Flutter apps
https://docs.bugsnag.com/platforms/flutter/
MIT License
11 stars 11 forks source link

Upgrade compileSdkVersion to 34 to fix "lStar not found" build issue #264

Closed gdelataillade closed 3 weeks ago

gdelataillade commented 1 month ago

Goal

This change is necessary to resolve an issue during the build process caused by an outdated compileSdkVersion. Specifically, the error occurred while verifying Android resources:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ‘:bugsnag_flutter:verifyReleaseResources’.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR: /Users/gdelataillade/dev/evolum_app/build/bugsnag_flutter/intermediates/merged_res/release/mergeReleaseResources/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.

Design

The approach used was to upgrade the compileSdkVersion from 31 to 34 in the Bugsnag Flutter dependency. This fixes the missing resource issue, as the newer SDK version supports the required attributes.

Changeset

Updated compileSdkVersion from 31 to 34 in the bugsnag_flutter module to align with the latest Android SDK compatibility.

Testing

The change was tested by rebuilding the Flutter project using the new SDK version. I use the following environment:

Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64)

After the update, the build was successful, and no further errors related to resource linking were encountered.

mclack commented 1 month ago

Hi @gdelataillade

The missing lStar attribute was added in SDK 31: https://developer.android.com/reference/android/R.attr#lStar

We are currently upgrading our compileSdkVersion from 29 to 31: https://github.com/bugsnag/bugsnag-flutter/pull/265

This should resolve the issue you were seeing, and we will make sure to update this thread when the new release is available.

hannah-smartbear commented 3 weeks ago

Hi @gdelataillade,

Just wanted to let you know that we have now upgraded the Android compileSdkVersion from 29 to 31 in v4.1.0 of bugsnag-flutter, so we are going to close this PR out now. Please let us know if you have any questions.

gdelataillade commented 3 weeks ago

Thanks