Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
869 stars 568 forks source link

[BUG]: Fix Android namespace Issue #1021

Closed JHarzenetter closed 6 months ago

JHarzenetter commented 6 months ago

Flutter Sound Version : 9.3.8

Flutter Version

Flutter Version 3.19.2


Severity


Platforms you faced the error


Logs!!!!

A problem occurred configuring project ':flutter_sound'.
> 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.

See this


Larpoux commented 6 months ago

@JHarzenetter : do you have another Java plugin or flutter sound is the only Java plugin?

JHarzenetter commented 6 months ago

Its the only Plugin

JHarzenetter commented 6 months ago

The solution to this would be adding the following to the Android block in the build.gradle

// Conditional for compatibility with AGP <4.2.
    if (project.android.hasProperty("namespace")) {
      namespace 'xyz.canardoux.fluttersound'
    }
Larpoux commented 6 months ago

Ok. I have done some adjustments on the further flutter sound version. Can you please wait some few days and then try again when the new release will be done? I am actually busy working on a bug with streams on iOS. Sorry for the inconvenience.

JHarzenetter commented 6 months ago

Great News. That shouldn't be a problem

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 365 days with no activity. Leave a comment or this will be closed in 7 days.

Larpoux commented 6 months ago

@JHarzenetter : this is fixed in Flutter Sound 9.4.5

Please, could you check if it is OK now, and close this issue if everything good ?

Larpoux commented 6 months ago

OK @JHarzenetter .

Please reopen this issue if not fixed in flutter Sound 9.4.5

AlaJaber97 commented 5 months ago

still the issue exists image

Larpoux commented 5 months ago

Strange: I thought that this problem was fixed. I am going to look tomorrow if I understand why. Of course are you sure you use >v9.4.5 ?

Larpoux commented 5 months ago

Can you check your AGP version (Android Gradle Plugin) ?

Larpoux commented 5 months ago

@AlaJaber97 : I don't see any problem.

Please check :

How do you build your App ? You can try to use a recent version of Android Studio because this Program does many things to manage the various versions (mine isAndroid Studio Iguana | 2023.2.1 Patch 2)

AlaJaber97 commented 4 months ago

You're right, I was using Flutter Sound version 8.5. After upgrading, the issue was resolved.