Error when upgrading to Expo 43: Execution failed for task ':expo:compileDebugJavaWithJavac'

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I’m in the process of upgrading my Expo project to version 43, and I’ve encountered an issue during the build process. When I run expo build:android, I’m getting the error: `Execution failed for task ‘:expo:compileDebugJavaWithJavac’.

I’ve checked my project’s configuration, and I believe it’s compatible with Expo 43. However, I’m not sure what’s causing this error.

Here are some details about my project: Operating System:
Ubuntu 20.04
Node.js version: v14.19.3
yarn version: 3.2.2
Expo SDK version: 43
Expo CLI version: 6.3.10
Java: 16.0.1
Kotlin: 1.6.0

this is my package.json

{
  "name": "@myapp/wt",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "mocks": "mocks-server",
    "set:env:dev": "node ./switchEnv.js --env dev",
    "set:env:local": "node ./switchEnv.js --env local",
    "set:env:prod": "node ./switchEnv.js --env prod",
    "set:env:test": "node ./switchEnv.js --env test",
    "set:env:uat": "node ./switchEnv.js --env uat"
  },
  "dependencies": {
    "@babel/runtime": "^7.12.5",
    "@expo/vector-icons": "^12.0.0",
    "@mocks-server/main": "^1.9.0",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/hooks": "^2.6.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/bottom-tabs": "^5.8.0",
    "@react-navigation/native": "^5.7.3",
    "@react-navigation/stack": "^5.9.0",
    "axios": "^0.21.1",
    "axios-mock-adapter": "^1.19.0",
    "buffer": "^6.0.3",
    "detox": "^18.2.2",
    "expo": "^43.0.0",
    "expo-asset": "~8.4.3",
    "expo-auth-session": "~3.4.2",
    "expo-checkbox": "~2.0.0",
    "expo-clipboard": "~2.0.3",
    "expo-constants": "~12.1.3",
    "expo-font": "~10.0.3",
    "expo-intent-launcher": "~10.0.3",
    "expo-linear-gradient": "~10.0.3",
    "expo-linking": "~2.4.2",
    "expo-network": "~4.0.3",
    "expo-notifications": "~0.13.3",
    "expo-random": "~12.0.1",
    "expo-secure-store": "~11.0.3",
    "expo-sharing": "~10.0.3",
    "expo-splash-screen": "~0.13.5",
    "expo-status-bar": "~1.1.0",
    "expo-updates": "~0.10.15",
    "expo-web-browser": "~10.0.3",
    "jest-circus": "^26.6.3",
    "kotlin": "^1.4.1",
    "libphonenumber-js": "^1.9.9",
    "moment": "^2.29.1",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-hook-form": "^6.13.1",
    "react-native": "0.64.4",
    "react-native-animated-loader": "^0.0.9",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.3",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.8.0",
    "react-native-svg": "12.1.1",
    "react-native-unimodules": "~0.15.0",
    "react-native-version-info": "^1.1.0",
    "react-native-web": "0.17.1",
    "save-dev": "^0.0.1-security"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.64.12",
    "@typescript-eslint/eslint-plugin": "^2.12.0",
    "@typescript-eslint/eslint-plugin-tslint": "^4.9.1",
    "@typescript-eslint/parser": "^4.7.0",
    "babel-jest": "~25.2.6",
    "eslint-config-universe": "^6.0.0",
    "eslint-import-resolver-babel-module": "^5.1.2",
    "eslint-plugin-import": "^2.20.1",
    "eslint-plugin-prettier": "^3.2.0",
    "jest": "~25.2.6",
    "jest-expo": "~43.0.1",
    "prettier": "^2.2.1",
    "react-test-renderer": "~16.13.1",
    "typescript": "~4.3.5"
  },
  "private": true
}

i need to upgrade to Expo 43 and then to Expo 44. i upgraded react-native to 0.64.4 to resolve :expo:compileDebugKotlin FAILED error. but now i am stuck with this issue Execution failed for task ':expo:compileDebugJavaWithJavac'

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.