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

Namespace not specified #44

Open
erperejildo opened this issue Aug 7, 2024 · 5 comments · May be fixed by #45
Open

Namespace not specified #44

erperejildo opened this issue Aug 7, 2024 · 5 comments · May be fixed by #45

Comments

@erperejildo
Copy link

A problem occurred configuring project ':maps_launcher'.
> 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
@sarahk
Copy link

sarahk commented Sep 9, 2024

Is there an ETA for pushing this fix?

@pauljonescodes
Copy link

This is also preventing me from using this plugin :-(

@maquejp
Copy link

maquejp commented Oct 2, 2024

Same here ... I am still using Koala patch 1 version of Android Studio

Execution failed for task ':maps_launcher:packageDebugResources'.

Error while evaluating property 'namespace' of task ':maps_launcher:packageDebugResources'.
Failed to calculate the value of task ':maps_launcher:packageDebugResources' property 'namespace'.
> Failed to calculate the value of property 'namespace'.
> Package Name not found in /home/devlin/.pub-cache/hosted/pub.dev/maps_launcher-2.2.1/android/src/main/AndroidManifest.xml, and namespace not specified. Please specify a namespace for the generated R and BuildConfig classes via android.namespace in the module's build.gradle file like so:

       android {
           namespace 'com.example.namespace'
       }

@paul-charlton
Copy link

Is there an updated on releasing this? It looks like there's a PR with the required changes.

Currently going to look at alternatvies...

@igoriuz
Copy link

igoriuz commented Dec 3, 2024

As a hotfix, you could add the following lines to android/build.gradle within allProjects

allprojects {
    repositories {
        google()
        mavenCentral()
    }
    // This code is where all the magic happens and fixes the error.
    subprojects {
        afterEvaluate { project ->
            if (project.hasProperty('android')) {
                project.android {
                    if (namespace == null) {
                        namespace project.group
                    }
                }
            }
        }
    }
    // This code is where all the magic happens and fixes the error.
}

Source: https://stackoverflow.com/a/77738936

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

Successfully merging a pull request may close this issue.

6 participants