Skip to content

Build fails due to deprecated jcenter() repository - Replace with mavenCentral() #189

@hasnainelahi

Description

@hasnainelahi

Issue Description

The video_thumbnail package fails to build on newer Android development environments due to the use of the deprecated jcenter() repository, which was shut down by JetBrains.

Error Details

When running flutter build apk, the build fails with the this error:
Where:
Build file '/Users/username/.pub-cache/hosted/pub.dev/video_thumbnail-0.5.6/android/build.gradle' line: 7

Root Cause

The issue is in the android/build.gradle file where jcenter() is used in the repositories block:

buildscript {
    repositories {
        google()
        jcenter()  // <- This is deprecated  Replace it with mavenCentral() 
    }
}

rootProject.allprojects {
    repositories {
        google()
        jcenter() // <- This is deprecated  Replace it with mavenCentral() 
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions