Skip to content

Build fails in flutter_poolakey: Could not find method jcenter() #43

@AliMohammad-Esmaeeli

Description

@AliMohammad-Esmaeeli

Hi 👋,

I’m building an Android release APK with Flutter, and the build fails during Gradle evaluation of the flutter_poolakey package.

Command:
flutter build apk --release

Error:
FAILURE: Build completed with 2 failures.

  • What went wrong:
    A problem occurred evaluating project ':flutter_poolakey'.

Could not find method jcenter() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.
(at /home/runner/.pub-cache/hosted/pub.dev/flutter_poolakey-2.2.0+1.0.0/android/build.gradle:5)

Problem:
It appears flutter_poolakey’s Gradle script uses jcenter(), but it’s not supported/available in the newer Gradle/AGP repository DSL, causing the build to fail.

Suggested fix:
Replace jcenter() with supported repositories such as mavenCentral() (and google() if required).

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions