skip to Main Content

I 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.
ERROR: ../build/onesignal_flutter/intermediates/merged_res/release/mergeReleaseResources/values/values.xml:2657: AAPT: error: resource android:attr/lStar not found.

I try follow this steps from GitHub repo issues comment:

(https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/930#issuecomment-2283832859)

2

Answers


  1. Chosen as BEST ANSWER

    I found this solution in Github repo comments:

    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
    }
    

    Solution Link in GitHub


  2. Add this line in your android level build.gradle file

    subprojects {
    
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    
        // add this line for onesignal_flutter to work in android device
        afterEvaluate {
            android {
                compileSdkVersion 34
            }
        }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search