Skip to content

AAPT: error: resource android:attr/lStar not found. #998

Closed
@tazy-dev

Description

@tazy-dev

I am Using flutter one signal package 3.5.4
everything was working Perfectly until i upgraded flutter to version 3.27.4

Now I Can no Longer build my app
using Flutter bulid apk or build appbundle results in an error message

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':onesignal_flutter:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR: G:\Nxt-Level\Mobile Apps\hatrick\build\onesignal_flutter\intermediates\merged_res\release\values\values.xml:2657: AAPT: error: resource android:attr/lStar not found.

  • Upgrading to version 5.2.9 Solves the Problem but
    it creates another one ( Which is the main reason why i was using the 3.5.4 version) and the problem is
    if i received a notification while the app is not open (completely closed) upon clicking i expect the app to wake and open
    but it doesn't and i need to click on the notification once again

`dart
initOneSignal() {
OneSignal.Debug.setLogLevel(
OSLogLevel.error,
);

OneSignal.initialize (AppConstants.oneSignalAppID);
OneSignal.Notifications.requestPermission(true);
}

setupNotification(BuildContext context) {
OneSignal.Notifications.addClickListener((openedResult) {
PodcastEntity podcastEntity = PodcastModel.fromJson(
jsonDecode(
openedResult.notification.additionalData!["podcast"],
),
).toEntity;
context.read().add(
NotificationClickedEvent(
entity: podcastEntity,
),
);
});
}
`

Activity

nan-li

nan-li commented on Feb 13, 2025

@nan-li
Contributor

Hi @tazy-dev, the android:attr/lStar issue looks related to some compileSdk versions. I recommend using v5.x.x of this SDK.

Upgrading to version 5.2.9 Solves the Problem but
it creates another one ( Which is the main reason why i was using the 3.5.4 version) and the problem is
if i received a notification while the app is not open (completely closed) upon clicking i expect the app to wake and open
but it doesn't and i need to click on the notification once again

Are you seeing this on Android, iOS, or both?

tazy-dev

tazy-dev commented on Feb 14, 2025

@tazy-dev
Author

For now Iam only developing it for android
So yeah only android...
Strangely as I said before when I was working with v 3.5.4 didn't have this problem...
But now it's happening and I don't know why
Clicking on a notification when app is off won't wake the application and open the notification
And clicking on the notification again is needed

nan-li

nan-li commented on May 8, 2025

@nan-li
Contributor

the problem is if i received a notification while the app is not open (completely closed) upon clicking i expect the app to wake and open but it doesn't and i need to click on the notification once again

Hi @tazy-dev, we have found that there are some Samsung or Redmi devices that will not open the app on a notification click. Is your device a Samsung or Redmi device? If so, we have resolved the issue and it will be available in the next release.

tazy-dev

tazy-dev commented on May 8, 2025

@tazy-dev
Author

@nan-li
Yeah IAM using redmi and my colleague(who is doing the testing with me use Samsung)
I actually solved the issue using some turnaround fix but
... That is a very good news ...
Thanks a lot for your hard work ❤️

nan-li

nan-li commented on May 20, 2025

@nan-li
Contributor

Great to hear you resolved already, we released the fix in Release 5.3.2 if you want to test it out. Otherwise, I will close out this ticket.
Please reach out with any further issues or questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nan-li@tazy-dev

        Issue actions

          AAPT: error: resource android:attr/lStar not found. · Issue #998 · OneSignal/OneSignal-Flutter-SDK