Skip to content

jcenter() not supported in Gradle 9+ #32

Closed

Description

@P1etroo

Hint from console:

Build file '<....>/node_modules/cleverpush-react-native/android/build.gradle' line: 5

  • What went wrong:
    A problem occurred evaluating project ':cleverpush-react-native'.

Could not find method jcenter() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.

Activity

  1. JakobFelixJulius commented on Mar 9, 2026

    @JakobFelixJulius

    We ran into the same issue when upgrading to Expo SDK 55 (React Native 0.83, Gradle 9).

    We're using patch-package to remove the embedded buildscript and allprojects blocks from android/build.gradle, since the parent project's Gradle configuration should be authoritative:

    diff --git a/node_modules/cleverpush-react-native/android/build.gradle b/node_modules/cleverpush-react-native/android/build.gradle
    index d3f6a00..cd9d8d9 100755
    --- a/node_modules/cleverpush-react-native/android/build.gradle
    +++ b/node_modules/cleverpush-react-native/android/build.gradle
    @@ -1,22 +1,3 @@
    -buildscript {
    -    repositories {
    -        maven { url 'https://maven.google.com' }
    -        mavenCentral()
    -        jcenter()
    -    }
    -    dependencies {
    -        classpath 'com.android.tools.build:gradle:7.3.0'
    -    }
    -}
    -
    -allprojects {
    -    repositories {
    -        maven { url 'https://maven.google.com' }
    -        mavenCentral()
    -        jcenter()
    -    }
    -}
    -
     apply plugin: 'com.android.library'
    

    The jcenter() references and the hardcoded gradle:7.3.0 dependency are both unnecessary — the host project already provides these. Removing the entire buildscript and allprojects blocks fixes the build on Gradle 9+.

    Would be great to get this fixed upstream so we can drop the patch.

  2. added 2 commits that reference this issue on Mar 14, 2026
    b5c0edb
    7e69fb3
  3. unnaticleverpush commented on Apr 16, 2026

    @unnaticleverpush
    Contributor

    Hi @P1etroo @JakobFelixJulius

    Thanks for your patience. We have released RN SDK version 1.7.25

    Please update to the latest version. Let us know if you encounter any issues or need further assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions