Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Android Gradle Plugin 8.4 #541

Open
taila-teq opened this issue Oct 22, 2024 · 1 comment
Open

Support for Android Gradle Plugin 8.4 #541

taila-teq opened this issue Oct 22, 2024 · 1 comment

Comments

@taila-teq
Copy link

After migrating the project to support Android 14, using Gradle 8.4. The FlutterToast not work anymore due to namespace problem

@taila-teq taila-teq changed the title Support for Android Gradle Plugin 8 +++ Support for Android Gradle Plugin 8.4 Oct 22, 2024
@MarlonJD
Copy link

To fix all namespace issues just edit your build.grade like this:

subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    afterEvaluate {
        // check if android block is available
        if (it.hasProperty('android')) {

            if (it.android.namespace == null) {
                def manifest = new XmlSlurper().parse(file(it.android.sourceSets.main.manifest.srcFile))
                def packageName = [email protected]()
                println("Setting ${packageName} as android namespace")
                android.namespace = packageName
            }
        }

    }
}

this will add namespaces to packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants