Run gradlew -> Error: Execution failed for task ':expo-updates:compileDebugKotlin'

I am using eas build for a managed expo project with expo sdk 44. with expo build every thing is ok, but with eas build when gradlew run i have this problem:

...
...
> Task :expo-structured-headers:javaPreCompileDebug
> Task :expo-structured-headers:compileDebugJavaWithJavac
> Task :expo-structured-headers:bundleLibCompileToJarDebug
> Task :expo-updates:generateDebugBuildConfig
> Task :expo-updates:kaptGenerateStubsDebugKotlin
> Task :expo-updates:kaptDebugKotlin
warning: Current JDK version 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10 has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).
> Task :expo-updates:compileDebugKotlin FAILED
[stderr] e: /root/workingdir/build/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt: (39, 7): 'onWillCreateReactInstanceManager' overrides nothing
[stderr] e: /root/workingdir/build/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt: (45, 7): 'onDidCreateReactInstanceManager' overrides nothing
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-updates:compileDebugKotlin'.
[stderr] > Compilation error. See log for more details
[stderr] * Try:
[stderr] Run with --stacktrace
[stderr] option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 3m 26s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
434 actionable tasks: 434 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Downgrade could help, when I specify expo sdk 42 specified in app.json I’m getting a different error. But I would like to use the latest 44. What is the problem with my project?

I run into the same problem:

warning: Current JDK version 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10 has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).
> Task :expo-updates:compileReleaseKotlin FAILED
[stderr] e: /root/workingdir/build/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt: (39, 7): 'onWillCreateReactInstanceManager' overrides nothing
[stderr] e: /root/workingdir/build/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt: (45, 7): 'onDidCreateReactInstanceManager' overrides nothing
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-updates:compileReleaseKotlin'.
[stderr] > Compilation error. See log for more details
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 7m 4s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
421 actionable tasks: 421 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

SDK 44
package.json::

{
  "dependencies": {
    "@fortawesome/fontawesome-pro": "^5.15.4",
    "@fortawesome/fontawesome-svg-core": "^1.2.36",
    "@fortawesome/free-brands-svg-icons": "^5.15.4",
    "@fortawesome/free-solid-svg-icons": "^5.15.4",
    "@fortawesome/pro-duotone-svg-icons": "^5.15.4",
    "@fortawesome/pro-light-svg-icons": "^5.15.4",
    "@fortawesome/pro-regular-svg-icons": "^5.15.4",
    "@fortawesome/pro-solid-svg-icons": "^5.15.4",
    "@fortawesome/react-fontawesome": "^0.1.16",
    "@fortawesome/react-native-fontawesome": "^0.2.7",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/datetimepicker": "4.0.0",
    "@react-native-community/masked-view": "0.1.11",
    "@react-native-community/netinfo": "7.1.3",
    "@react-native-picker/picker": "2.2.1",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "@react-navigation/stack": "^6.0.11",
    "@sentry/react": "^6.15.0",
    "@types/node": "^17.0.4",
    "@unimodules/core": "~7.2.0",
    "crypto-js": "^4.1.1",
    "expo": "^44.0.0",
    "expo-app-loading": "~1.3.0",
    "expo-application": "~4.0.1",
    "expo-auth-session": "~3.5.0",
    "expo-barcode-scanner": "~11.2.0",
    "expo-constants": "~13.0.0",
    "expo-device": "~4.1.0",
    "expo-localization": "~12.0.0",
    "expo-random": "~12.1.1",
    "expo-secure-store": "~11.1.0",
    "expo-splash-screen": "~0.14.1",
    "expo-updates": "~0.11.3",
    "i18n-js": "^3.8.0",
    "lodash-es": "^4.17.21",
    "react": "17.0.1",
    "react-date-picker": "^8.3.5",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-elements": "^3.4.2",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-offline": "^5.8.0",
    "react-native-qrcode-svg": "^6.1.1",
    "react-native-reanimated": "~2.3.1",
    "react-native-root-siblings": "^4.1.1",
    "react-native-root-toast": "^3.3.0",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-svg": "12.1.1",
    "react-native-svg-charts": "^5.4.0",
    "react-native-web": "0.17.1",
    "react-native-web-webview": "^1.0.2",
    "react-native-webview": "11.15.0",
    "react-native-youtube-iframe": "^2.2.0",
    "react-redux": "^7.2.6",
    "react-time-picker": "^4.4.4",
    "redux": "^4.1.2",
    "redux-mock-store": "^1.5.4",
    "redux-persist": "^6.0.0",
    "redux-persist-expo-filesystem": "^2.0.0",
    "redux-persist-transform-encrypt": "^3.0.1",
    "redux-saga": "^1.1.3",
    "redux-thunk": "^2.4.0",
    "sentry-expo": "^4.0.0",
    "jest": "^26.6.3",
    "expo-status-bar": "~1.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@expo/webpack-config": "~0.16.2",
    "@react-navigation/devtools": "^6.0.4",
    "@redux-devtools/core": "^3.9.1",
    "@redux-devtools/dock-monitor": "^1.4.1",
    "@redux-devtools/log-monitor": "^2.3.1",
    "@storybook/addon-actions": "^6.4.9",
    "@storybook/addon-docs": "^6.4.9",
    "@storybook/addon-essentials": "^6.4.9",
    "@storybook/addon-links": "^6.4.9",
    "@storybook/addon-react-native-web": "^0.0.16",
    "@storybook/react": "^6.4.9",
    "@storybook/theming": "^6.4.9",
    "@testing-library/react-native": "^7.2.0",
    "@types/i18n-js": "^3.8.2",
    "@types/jest": "^27.0.3",
    "@types/react": "~17.0.21",
    "@types/react-dom": "~17.0.9",
    "@types/react-native": "~0.64.12",
    "@types/react-test-renderer": "^17.0.1",
    "@types/webpack-env": "^1.16.3",
    "@typescript-eslint/eslint-plugin": "^4.33.0",
    "@typescript-eslint/parser": "^4.33.0",
    "@welldone-software/why-did-you-render": "^6.2.3",
    "babel-preset-expo": "9.0.1",
    "eslint": "^7.32.0",
    "jest-expo": "^44.0.0",
    "prettier": "^2.4.1",
    "prop-types": "^15.8.0",
    "qrcode": "^1.4.4",
    "react-native-debugger": "^1.1.0",
    "react-refresh": "^0.11.0",
    "react-test-renderer": "^17.0.2",
    "redux-devtools-extension": "^2.13.9",
    "sharp": "^0.29.3",
    "typesafe-actions": "^5.1.0",
    "typescript": "~4.3.5",
    "webpack-bundle-analyzer": "^4.5.0"
  },
  "jest": {
    "verbose": false,
    "projects": [
      {
        "preset": "jest-expo/ios"
      },
      {
        "preset": "jest-expo/android"
      },
      {
        "preset": "jest-expo/web"
      }
    ],
    "testRegex": "(/__tests__/.*|/src/.*\\.(test|spec))\\.(jsx?|js?|tsx?|ts?)$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "ios.ts",
      "ios.tsx",
      "android.ts",
      "android.tsx",
      "native.ts",
      "native.tsx",
      "web.ts",
      "web.tsx",
      "node"
    ],
    "transformIgnorePatterns": [
      "node_modules/(?!(jest-)?redux|react-redux|redux-thunk|react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|@sentry/.*|sentry-expo|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base)"
    ]
  },
  "prettier": {
    "tabWidth": 4,
    "useTabs": true,
    "insertPragma": true
  },
  "private": true,
  "sideEffects": true,
  "name": "---",
  "version": "1.0.0"
}

This was a problem with expo-sentry not finding expo-updates…
Deleting node_modules and reinstalling solved the problem.