justsoft / video_thumbnail

This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
MIT License
186 stars 285 forks source link

using video_thumbnail 0.5.3 i go this error Namespace not specified. #174

Open hosaaam opened 2 weeks ago

hosaaam commented 2 weeks ago

while i build my project i got his error A problem occurred configuring project ':video_thumbnail'.

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. iam using flutter sdk :3.24.4

Rahat-Iqbal-git commented 1 week ago

@hosaaam have you found any workaround? I am stuck with this error as well.

xsahil03x commented 1 week ago

For a workaround, you can use this in your android/build.gradle file.

subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"

    afterEvaluate {
        // check if `android` block is available and namespace isn't set
        if(it.hasProperty('android') && it.android.namespace == null){
            def manifest = new XmlSlurper().parse(file(it.android.sourceSets.main.manifest.srcFile))
            def packageName = manifest.@package.text()
            android.namespace= packageName
        }
    }

}
Shahidbangash commented 4 days ago

facing same issue , will clone and apply fix

Shahidbangash commented 3 days ago

i have create pull request and waiting for approval .

meanwhile you can use updated reference to my pacakge code

replace video_thumbnail: your_version_of_package with

video_thumbnail: git: url: https://github.com/Shahidbangash/video_thumbnail.git ref: master