rozerro
rozerro

Reputation: 7156

flutter_document_picker creates a problem in a newly created application

The app uses flutter_document_picker plugin.

flutter_document_picker: ^5.2.3

An error occurs when launching the application:

FAILURE: Build failed with an exception.

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

The namespace is written in build.gradle

android {
    namespace = “com.mypackage.my_app_name”
    ...

And package in androidmanifest also specified:

package= “com.mypackage.my_app_name”

Probably some additional configurations are required, but the information in the documentation description of this plugin is rather scarce.

In Android Intent.ACTION_OPEN_DOCUMENT is used. This intent is supported only from Android 19 (KitKat) SDK version. So this plugin can be used only if app minSdkVersion is 19 or more.

Does this need to be written somehow in AndroidManifest.xml ?

Upvotes: 0

Views: 14

Answers (0)

Related Questions