flutter-nfc-manager
flutter-nfc-manager copied to clipboard
Namespace not specified. Specify a namespace in the module's build file
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.
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.
the flutter plugin nfc_manager doesnt appear