Skip to content

Conversation

wosika
Copy link

@wosika wosika commented Apr 11, 2025

Fixes #

In the new version of flutter 3.24.5 and above, if the android app/build.gradle does not have a namespace, it will cause an error when build release apk.

my gradle & kotlin version

// gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
// settings.gradle
plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.1.0" apply false
    id "org.jetbrains.kotlin.android" version "2.0.20" apply false
}

@std-s
Copy link
Member

std-s commented Apr 14, 2025

Hi, could you upload the exact cause of the error?

@wosika
Copy link
Author

wosika commented Apr 14, 2025

Hi, could you upload the exact cause of the error?

I use flutter build apk throw this error.


flutter version  3.24.5

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_openim_sdk'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

* 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.

BUILD FAILED in 8s

@ne1llee
Copy link

ne1llee commented Apr 22, 2025

@std-s When will this patch be merged?

@std-s
Copy link
Member

std-s commented Sep 15, 2025

@std-s When will this patch be merged?

It will not be merged for the time being. If necessary, you can use his fork repository.

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

Successfully merging this pull request may close these issues.

3 participants