Skip to content

foojay-resolver-convention 0.5.0 incompatible with Gradle 9.0.0 (IBM_SEMERU removed) #55781

Description

@davaidev

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @react-native/gradle-plugin@0.83.2 for the project I'm working on.

Problem

settings.gradle.kts pins foojay-resolver-convention to version 0.5.0, which references
JvmVendorSpec.IBM_SEMERU — a constant removed in Gradle 9.0.0. Expo SDK 55 ships with
Gradle 9.0.0, so any project using Expo SDK 55 + React Native 0.83 fails to build with:
Class org.gradle.jvm.toolchain.JvmVendorSpec does not have member field
'org.gradle.jvm.toolchain.JvmVendorSpec IBM_SEMERU'

Updating to foojay-resolver-convention 1.0.0 fixes the issue — this version drops the
IBM_SEMERU reference entirely.

Environment

  • @react-native/gradle-plugin: 0.83.2
  • Gradle: 9.0.0
  • Expo SDK: 55

Here is the diff that solved my problem:

diff --git a/node_modules/@react-native/gradle-plugin/settings.gradle.kts b/node_modules/@react-native/gradle-plugin/settings.gradle.kts
index b3c46a3..14f1e9c 100644
--- a/node_modules/@react-native/gradle-plugin/settings.gradle.kts
+++ b/node_modules/@react-native/gradle-plugin/settings.gradle.kts
@@ -13,7 +13,7 @@ pluginManagement {
}
}

-plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0") }
+plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("1.0.0") }

include(
":react-native-gradle-plugin",

This issue body was partially generated by patch-package.

Activity

  1. react-native-bot commented on Feb 26, 2026

    @react-native-bot
    Collaborator

    Warning

    Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


    You can read more about about it on our website: How to report a bug.

  2. koyukan commented on Mar 12, 2026

    @koyukan

    Confirming this affects all RN versions through 0.86.0 nightly (verified 2026-03-11).

    I checked node_modules/@react-native/gradle-plugin/settings.gradle.kts across every published RN version — all ship foojay-resolver-convention 0.5.0. No version includes >= 1.0.0.

    Reproduction

    npx expo prebuild --platform android
    cd android && ./gradlew assembleDebug
    

    Crashes with:

    Class org.gradle.jvm.toolchain.JvmVendorSpec does not have member field
    'org.gradle.jvm.toolchain.JvmVendorSpec IBM_SEMERU'
    

    Environment

    • Expo SDK 55 (expo@55.0.5)
    • React Native 0.83.2
    • Gradle 9.0.0 (shipped by Expo SDK 55)
    • @react-native/gradle-plugin 0.83.2
    • macOS 15.4, Apple Silicon

    Workaround

    Install JDK 17 locally and disable Gradle's auto-download to bypass the foojay resolver entirely:

    # ~/.gradle/gradle.properties
    org.gradle.java.installations.auto-download=false
    org.gradle.java.installations.paths=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home

    This avoids the foojay code path completely. The patch-package approach from the OP also works but is fragile since npx expo prebuild regenerates the android/ directory.

    Fix

    Bump foojay-resolver-convention from 0.5.0 to 1.0.0 in @react-native/gradle-plugin/settings.gradle.kts. The fix is a one-line version change — foojay 1.0.0 drops the IBM_SEMERU reference.

  3. sschuberth commented on Mar 20, 2026

    @sschuberth

    See #54160. Unfortunately, it was closed unmerged (but for the wrong reasons, IMO).

  4. retu2libc commented on Apr 4, 2026

    @retu2libc

    Duplicate of #56287.

    Fixed in #56210.

  5. react-native-bot commented on Apr 28, 2026

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  6. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Apr 28, 2026
  7. react-native-bot commented on May 22, 2026

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  8. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on May 22, 2026
  9. 6 remaining items

  10. RobertKuhfss commented on Jul 13, 2026

    @RobertKuhfss

    Fixed it by manually adding "yarn add @react-native/gradle-plugin" => "@react-native/gradle-plugin": "^0.86.0"

  11. removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jul 14, 2026
  12. claudiovb commented on Jul 16, 2026

    @claudiovb

    Hey I just stumbled on this issue and I have this details that might help to reproduce it:

    Repro requires no local JDK 17 present. The crash only fires when Gradle's toolchain auto-provisioning kicks in, which only happens if no JDK matching the RN gradle-plugin's jvmToolchain(17) exists locally. Anyone with JDK 17 already installed (most maintainers) never hits the foojay 0.5.0 code path...

    Minimal repro:

    Fresh RN 0.83+ / Expo SDK 55 app (ships the Gradle 9.0 wrapper)
    No local JDK 17 (only a newer JDK, e.g. Android Studio's JBR 21)
    ./gradlew help → NoSuchFieldError: JvmVendorSpec.IBM_SEMERU
    I fixed it locally in my node modules (not a real fix) doing this: bumping foojay-resolver-convention to 1.0.0 in packages/gradle-plugin/settings.gradle.kts (merged to main in #56210, but not backported 0.83-stable, 0.84-stable, 0.85-stable all still pin 0.5.0).
    #1349

  13. react-native-bot commented on Aug 10, 2026

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  14. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Aug 10, 2026
  15. react-native-bot commented on Sep 4, 2026

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  16. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Sep 4, 2026
  17. react-native-bot commented on Sep 28, 2026

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  18. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Sep 28, 2026
  19. react-native-bot commented on Oct 5, 2026

    @react-native-bot
    Collaborator

    This issue was closed because it has been stalled for 7 days with no activity.

  20. react-native-bot commented on Oct 5, 2026

    @react-native-bot
    Collaborator

    This issue was closed because the author hasn't provided the requested feedback after 7 days.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions