flutter-nfc-manager icon indicating copy to clipboard operation
flutter-nfc-manager copied to clipboard

Namespace not specified. Specify a namespace in the module's build file

Open mscaletjlb opened this issue 1 year ago • 2 comments

When using this module and updating gradle to a recent version (>= 8.0), it complains that there is no namespace in build.gradle:


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':nfc_manager'.
> 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.

Solution:

add: namespace 'io.flutter.plugins.nfcmanager'

to build.gradle and it compiles fine.

mscaletjlb avatar Aug 02 '23 10:08 mscaletjlb

To make the solution clear, add the above namespace to build.gradle under nfc_manager plugin's android/build.gradle file (not your own project).

android {
    compileSdkVersion 31

    ...

    namespace 'io.flutter.plugins.nfcmanager'
}

In Android Studio, this file can be accessed from Project panel - External Libraries - Flutter Plugins - nfc_manager-3.3.0.

xlfdll avatar Aug 03 '23 15:08 xlfdll

the flutter plugin nfc_manager doesnt appear

JabalnurIT avatar Nov 29 '23 01:11 JabalnurIT