Almoullim / background_location

Flutter background location plugin for Android and iOS
https://pub.dev/packages/background_location
Other
224 stars 236 forks source link

Namespace not specified in the latest version of background_location #219

Closed ClevertonZarelli closed 1 month ago

ClevertonZarelli commented 1 month ago

Hello,

I'm encountering an issue with the latest version of the background_location package. When I try to build my Flutter project, the build fails with the following error:

A problem occurred configuring project ':background_location'.

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. It appears that the namespace is not specified in the module's build file as required by the latest Android Gradle Plugin (AGP). According to the documentation, the namespace needs to be defined explicitly, starting from AGP version 7.0.0 and onwards. The link provided in the error suggests migrating the package attribute from the AndroidManifest.xml to the build.gradle file.

Since I don't have direct access to the package to apply the fix, and forking the package is not ideal, could you please address this issue in an upcoming release by adding the necessary namespace declaration in the build.gradle file?

Here is the error message in more detail:

FAILURE: Build failed with an exception.

Add background_location to a Flutter project using the latest Android Gradle Plugin. Run flutter build apk. The build fails with the above error. Environment:

Flutter version: [Your Flutter version] Android Gradle Plugin: 8.0.0+ Kotlin version: 1.8.22 background_location version: [Latest version] Thank you in advance for your assistance!

abdullah017 commented 3 weeks ago

I get the same error background_location: ^0.13.0

kamranbekirovyz commented 5 days ago

I get the same error background_location: ^0.13.0

Same.