Closed sohyuyuan closed 2 months ago
i am also facing this same issue in flutter latest version 3.24.0 i am upgrading my project which is i created around 18 month ago and change onesignal_flutter version 3.5.0 to 5.2.2,and also made some changes like / OneSignal.shared.setAppId(oneSignalAppId); OneSignal.shared .promptUserForPushNotificationPermission() .then((accepted) {}); / OneSignal.Debug.setLogLevel(OSLogLevel.verbose); OneSignal.initialize(oneSignalAppId); OneSignal.Notifications.requestPermission(true).then((accepted) { debugPrint(" #####OneSignal Permission Accepted:$accepted #####"); });
android and ios both working fine in emulator/simulator and notification also working fine
but whenever i tried to generate debug/release apk i got error same as like
* 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:/Users/ankitthummar/Desktop/fl_rc_supreme_web/build/onesignal_flutter/intermediates/merged_res/release/values/values.xml:2657: AAPT: error: resource android:attr/lStar not found.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
I'm facing the same issue.
There seems to be a issue with the latest flutter version 3.24.0 after downgrading to 3.22.3 it's working.
Same
Some developer update latest version update this dependecies
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action Android resource linking failed ERROR:D:\sunil\sanjeevani\build\onesignal_flutter\intermediates\merged_res\release\values\values.xml:2657: AAPT: error: resource android:attr/lStar not found.
update compile sdk version compileSdkVersion 34
main android folder group 'com.onesignal.flutter' version '5.2.2'
buildscript { repositories { google() mavenCentral() }
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
}
}
rootProject.allprojects { repositories { google() mavenCentral() } }
apply plugin: 'com.android.library'
android { compileSdkVersion 34 // Condition for namespace compatibility in AGP <4.2 if (project.android.hasProperty("namespace")) { namespace 'com.onesignal.flutter' }
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies { implementation 'com.onesignal:OneSignal:5.1.17' }
Facing Same Issue
Same Issue
Same Issue
Same issue
Same issue here
Same issue
same issue
Same issue
Same issue 😞
please update this plugin onesignal i will changes in file then run my project
Any changes ?!?!?*1!?
Add the code block below to the android/build.gradle file in your project directory.
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
// Add this
afterEvaluate {
android {
compileSdkVersion 34
}
}
// End
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
The code is a Gradle configuration script used in Android projects. The subprojects block allows you to configure certain settings for all subprojects (modules) in the project. The afterEvaluate block contains code that will run after the initial configuration is completed, ensuring that all settings are fully read and evaluated before making any changes.
The android block defines Android-related configuration settings, and the compileSdkVersion 34 line ensures that projects are compiled with Android API 34. This is important for leveraging the latest API features on Android, as newer APIs generally offer better performance, security, and new features.
After implementing these changes, you should perform comprehensive testing throughout the entire project to ensure that everything functions as expected. Additionally, be mindful of potential side effects that might affect other dependencies in your project.
This is a temporary solution. I still recommend that the OneSignal team upgrade the compile SDK version and perform a comprehensive evaluation of their package.
Add the code block below to the android/build.gradle file in your project directory.
allprojects { repositories { google() mavenCentral() } } rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" // Add this afterEvaluate { android { compileSdkVersion 34 } } // End } subprojects { project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { delete rootProject.buildDir }
The code is a Gradle configuration script used in Android projects. The subprojects block allows you to configure certain settings for all subprojects (modules) in the project. The afterEvaluate block contains code that will run after the initial configuration is completed, ensuring that all settings are fully read and evaluated before making any changes.
The android block defines Android-related configuration settings, and the compileSdkVersion 34 line ensures that projects are compiled with Android API 34. This is important for leveraging the latest API features on Android, as newer APIs generally offer better performance, security, and new features.
After implementing these changes, you should perform comprehensive testing throughout the entire project to ensure that everything functions as expected. Additionally, be mindful of potential side effects that might affect other dependencies in your project.
@sohyuyuan It work for me Thank you
onesignal_flutter: ^5.2.3 released any one tried this one? and stil facing same issue?
onesignal_flutter: ^5.2.3 released any one tried this one? and facing same issue?
Yep, I still receive the same error. I just tried to compile using onesignal_flutter: ^5.2.3
on Android but no fix.
@sohyuyuan has a solution so you can continue to build and release on Android but it would be great if the OneSignal team were able to fix properly
I am facing the same issue. It started to occur after I upgraded the flutter version to 3.24.0. Also, I am currently using one signal version 5.2.3 (which happens to be the latest version as of writing this comment). The only solution I found is downgrading the flutter version.
Same issue here and I'm using the version 5.2.3 of OneSignal and the (temporary) solution was from @sohyuyuan. In my case, I don't want to downgrade the Flutter version.
Why updating your package if you doesn't getting permanent solution please update compilesdk version and targetsdk version 34 in your latest updates targetsdk 33 and compile sdk 34 this is reason your updating package doesn't work.please before testing then update your package so many developer use your plugin and updating flutter package
@sohyuyuan Thanks alot brother. yesterday i spent 15 hours in office but didn't solve the issue now I just found you solution and it worked
Thanks @sohyuyuan !!
Hello everyone! Thanks for your patience. This should be fixed in 5.2.4. Please let us know if there are any additional questions or concerns.
Update gradle 7.0.0 in build.gradle could not parse pom com.android.tools:common:30.0.0 content not allowed in prolog . change below line classpath 'com.android.tools.build:gradle:8.1.0'
Update gradle 7.0.0 to 8.1.0
On Mon, 2 Sept 2024, 8:48 am sohyuyuan, @.***> wrote:
Closing the issue as version5.2.4 https://github.com/OneSignal/OneSignal-Flutter-SDK/releases/tag/5.2.4 is no longer blocking me from building the Android APK.
Hello everyone! Thanks for your patience. This should be fixed in 5.2.4 https://github.com/OneSignal/OneSignal-Flutter-SDK/releases/tag/5.2.4. Please let us know if there are any additional questions or concerns.
— Reply to this email directly, view it on GitHub https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/930#issuecomment-2323734099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMIGS2YA3B2ZN6WNSKFP2QLZUPKJLAVCNFSM6AAAAABMHUSEKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTG4ZTIMBZHE . You are receiving this because you commented.Message ID: @.***>
What happened?
I am encountering a lStar not found issue when attempting to build my Flutter application in release mode using the onesignal_flutter: ^5.2.2 package. This issue occurs after upgrading to Flutter SDK 3.24.0.
Steps to reproduce?
What did you expect to happen?
The application should build successfully without any issues.
Proposed Solution: To resolve this issue, the onesignal_flutter should update its Android build.gradle to utilise compileSdk 31 or higher.
OneSignal Flutter SDK version
Release 5.2.2
Which platform(s) are affected?
Relevant log output
Code of Conduct