jhomlala / betterplayer

Better video player for Flutter, with multiple configuration options. Solving typical use cases!
Apache License 2.0
927 stars 1.02k forks source link

[BUG]Namespace not specified. Specify a namespace in the module's build file. #1345

Open chandruyadav1995 opened 5 days ago

chandruyadav1995 commented 5 days ago

History check Yes Describe the bug FAILURE: Build failed with an exception.

*Example code used the code as per the code block

Flutter doctor Please add flutter doctor output here.

Screenshot 2024-10-28 at 10 02 19 AM

Better Player version

Smartphone (please complete the following information):

Additional context

Screenshot 2024-10-28 at 10 03 26 AM
ostue commented 5 days ago

BetterPlayer doesnt currently support the newest gradle version. But you can quickly fix it yourself:

Go to your Pub/Cache folder where flutter caches your packages, look for betterplayer and the build.gradle file.

Then add:

namespace = "com.jhomlala.better_player" right before compileSdkVersion 31

full code example:

...

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    namespace = "com.jhomlala.better_player"
    compileSdkVersion 31

    compileOptions {
    ...

This should resovle the problem