EAS Android build always fail when execute "run gradlew" step

Hello,
Recently I upgrade my project to use SDK 48 from SDK 45 but I am having issues to create any Android build(For iOS build are working correctly).

when I try to create a build on Android, the step “run gradlew” fail with message:
Build failed: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.

Does anyone knows why is this happen or if I need to set a specific config?

Hi @dealseal

It is impossible to say without more information.

Check the gradle logs. Search for “FAIL” and see what error messages you find. It probably says something like:

Task :app:something FAILED followed by some details.

Also, check the “expo doctor” logs and see if there are any warnings.

It is failing regarding: Task :app:mergeLibDexDebug FAILED

there is not warning in any of the previous steps(included expo doctor)

OK, so there should be an error message just after that line. What does it say?

Do you by any chance have both @react-native-masked-view/masked-view and @react-native-community/masked-view installed?

I think I only use @react-native-community/masked-view and react-native-masked-text

Please paste your dependencies and devDependencies from package.json here.

Also, @react-native-community/masked-view is deprecated and you should use @react-native-masked-view/masked-view instead.

image

“devDependencies”: {
@babel/core”: “^7.20.0”,
@types/react”: “~18.0.27”,
@types/react-native”: “~0.70.6”,
@types/yup”: “^0.29.14”,
@typescript-eslint/eslint-plugin”: “^5.26.0”,
@typescript-eslint/parser”: “^5.26.0”,
“babel-plugin-module-resolver”: “^5.0.0”,
“babel-preset-expo”: “^9.3.0”,
“eslint”: “^8.16.0”,
“eslint-config-airbnb-typescript”: “^17.0.0”,
“eslint-config-prettier”: “^8.5.0”,
“eslint-plugin-import”: “^2.20.1”,
“eslint-plugin-jsx-a11y”: “^6.2.3”,
“eslint-plugin-prettier”: “^4.0.0”,
“eslint-plugin-react”: “^7.18.3”,
“eslint-plugin-react-hooks”: “^4.5.0”,
“husky”: “^8.0.1”,
“jest-expo”: “^48.0.0”,
“jetifier”: “^2.0.0”,
“prettier”: “^2.6.2”,
“pretty-quick”: “^3.1.3”,
“typescript”: “^4.9.4”
},

 "dependencies": {
    "@apollo/client": "^3.6.4",
    "@expo/vector-icons": "^13.0.0",
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1",
    "@fortawesome/react-native-fontawesome": "^0.3.0",
    "@material-ui/icons": "^4.9.1",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/eslint-config": "^3.0.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-community/slider": "4.4.2",
    "@react-native-firebase/analytics": "^18.0.0",
    "@react-native-firebase/app": "^18.0.0",
    "@react-native-masked-view/masked-view": "0.2.8",
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/compat": "^5.3.20",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/stack": "^6.3.16",
    "@types/react-native-snap-carousel": "^3.8.5",
    "@wwdrew/react-native-numeric-textinput": "^1.1.0",
    "accordion-collapse-react-native": "^1.0.1",
    "apollo-cache-inmemory": "^1.6.5",
    "apollo-client": "^2.6.4",
    "apollo-link": "^1.2.13",
    "apollo-link-context": "^1.0.19",
    "apollo-link-error": "^1.1.12",
    "apollo-link-http": "^1.5.16",
    "apollo-link-retry": "^2.2.15",
    "apollo-link-token-refresh": "^0.6.0",
    "apollo-upload-client": "^17.0.0",
    "dayjs": "^1.10.7",
    "expo": "~48.0.18",
    "expo-asset": "~8.9.1",
    "expo-av": "~13.2.1",
    "expo-build-properties": "~0.6.0",
    "expo-camera": "~13.2.1",
    "expo-clipboard": "~4.1.2",
    "expo-contacts": "~12.0.1",
    "expo-dev-client": "~2.2.1",
    "expo-device": "~5.2.1",
    "expo-font": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-linking": "~4.0.1",
    "expo-localization": "~14.1.1",
    "expo-location": "~15.1.1",
    "expo-notifications": "~0.18.1",
    "expo-splash-screen": "~0.18.2",
    "expo-status-bar": "~1.4.4",
    "expo-store-review": "~6.2.1",
    "expo-system-ui": "~2.2.1",
    "expo-updates": "~0.16.4",
    "expo-web-browser": "~12.1.1",
    "formik": "^2.1.1",
    "graphql": "^16.7.1",
    "graphql-tag": "^2.10.1",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.15",
    "prop-types": "^15.7.2",
    "react": "18.2.0",
    "react-apollo": "^3.1.3",
    "react-dom": "18.2.0",
    "react-native": "0.71.8",
    "react-native-anchor-carousel": "^4.0.1",
    "react-native-chart-kit": "^6.11.0",
    "react-native-dashed-line": "^1.1.0",
    "react-native-date-picker": "^4.2.2",
    "react-native-datepicker": "^1.7.2",
    "react-native-draggable": "^3.0.0",
    "react-native-draggable-flatlist": "^4.0.1",
    "react-native-easy-toast": "^2.0.0",
    "react-native-fast-image": "^8.3.4",
    "react-native-flip-card": "^3.5.5",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-keyboard-avoid": "^1.2.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keyboard-height": "^1.1.2",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-loading-spinner-overlay": "^3.0.0",
    "react-native-masked-text": "^1.13.0",
    "react-native-material-color": "^1.0.15",
    "react-native-mime-types": "^2.3.0",
    "react-native-paper": "^5.8.0",
    "react-native-purchases": "^6.0.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area": "^0.5.1",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-snap-carousel": "^4.0.0-beta.6",
    "react-native-speedometer": "^1.0.5",
    "react-native-svg": "13.4.0",
    "react-native-svg-charts": "^5.3.0",
    "react-native-vector-icons": "^9.1.0",
    "react-native-web": "~0.18.10",
    "react-number-format": "^5.2.2",
    "rn-masked-text-input": "^1.3.1",
    "yup": "^1.2.0"
  },

You have both versions of MaskedView installed. Remove one of them.