Error while building Android App Bundle

Please provide the following:

  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.

After solving more build errors I came across this one that seems unsolvable:

Task :expo:compileReleaseKotlin
w: /app/turtle/workingdir/android/sdk43/packages/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (134, 38): Unchecked cast: Any! to T
w: /app/turtle/workingdir/android/sdk43/packages/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (148, 45): Unchecked cast: Any! to T
w: /app/turtle/workingdir/android/sdk43/packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (15, 37): ‘UIImplementationProvider’ is deprecated. Deprecated in Java
w: /app/turtle/workingdir/android/sdk43/packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (42, 47): ‘UIImplementationProvider’ is deprecated. Deprecated in Java
w: /app/turtle/workingdir/android/sdk43/packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (100, 34): Unchecked cast: Any! to T
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ‘:app:processReleaseMainManifest’.
[stderr] >$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 238; columnNumber: 62; The entity name must immediately follow the ‘&’ in the entity reference.
[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
[stderr] BUILD FAILED in 43s
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 Command-Line Interface
25 actionable tasks: 25 executed
Error: ./gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
at Object.onceWrapper (events.js:421:26)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

at spawnAsync (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
at spawnAsyncThrowError (/app/turtle/node_modules/@expo/xdl/build/detach/ExponentTools.js:201:45)
at buildShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:985:11)
at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:396:5)
at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
at async build (/app/turtle/build/jobManager.js:181:33)
at async processJob (/app/turtle/build/jobManager.js:118:32)
at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
at async main (/app/turtle/build/server.js:66:13)

Build Number : e7211912

Is there anything I can do about it ?

Thank you in advance!

Hey @maicanvlad7, how are you building your AAB?

i have the same problem:
i build with expo build:android, then i select app-bundle.

if i run “expo doctor”, it tells me that everything is ok.

I am running expo version 43, can this be the problem ?

As @mixradu said, running expo doctor shows everything is fine…

This is such a draw-back for the project I am working on because everything was fine until now :slight_smile:

Please help! I can pay :D.

I tried to make only APK.
tried to uninstall a lot of packages.

My package.json

  "scripts": {
    "start": "react-native start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  "jest": {
    "preset": "jest-expo"
  "dependencies": {
    "@expo/metro-config": "^0.1.84",
    "@expo/ngrok": "^4.1.0",
    "@expo/vector-icons": "^12.0.0",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/slider": "4.1.7",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/native-stack": "^6.1.0",
    "axios": "^0.21.1",
    "date-fns": "^2.15.0",
    "date-fns-timezone": "^0.1.4",
    "date-fns-tz": "^1.0.10",
    "expo": "^43.0.0",
    "expo-apple-authentication": "~4.0.3",
    "expo-asset": "~8.4.3",
    "expo-blur": "~10.0.3",
    "expo-constants": "~12.1.3",
    "expo-facebook": "~12.0.3",
    "expo-firebase-analytics": "~5.0.3",
    "expo-font": "~10.0.3",
    "expo-haptics": "~11.0.3",
    "expo-keep-awake": "~10.0.0",
    "expo-linear-gradient": "~10.0.3",
    "expo-linking": "~2.4.2",
    "expo-location": "~13.0.4",
    "expo-network": "~4.0.3",
    "expo-notifications": "~0.13.3",
    "expo-permissions": "~13.0.3",
    "expo-screen-capture": "^3.1.0",
    "expo-secure-store": "~11.0.3",
    "expo-speech": "~10.0.3",
    "expo-splash-screen": "~0.13.5",
    "expo-status-bar": "~1.1.0",
    "expo-store-review": "~5.0.3",
    "expo-updates": "~0.10.13",
    "expo-web-browser": "~10.0.3",
    "install": "^0.13.0",
    "intl": "^1.2.5",
    "lodash": "^4.17.20",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-bouncy-touchable": "^1.0.0",
    "react-native-calendars": "^1.1260.0",
    "react-native-countdown-component": "^2.7.1",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-maps": "0.28.0",
    "react-native-open-maps": "^0.4.0",
    "react-native-pager-view": "5.4.6",
    "react-native-progress-circle": "^2.1.0",
    "react-native-reanimated": "~2.2.0",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.8.0",
    "react-native-svg": "12.1.1",
    "react-native-toast-message": "^1.3.2",
    "react-native-walkthrough-tooltip": "^1.2.0",
    "react-native-web": "0.17.1",
    "rn-placeholder": "^3.0.3",
    "expo-device": "~4.0.3"
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.64.12",
    "babel-eslint": "^10.1.0",
    "babel-preset-expo": "8.5.1",
    "eslint": "^7.30.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-import": "^2.23.4",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.24.0",
    "eslint-plugin-react-hooks": "^4.2.0",
    "jest-expo": "^43.0.0",
    "react-native-svg-transformer": "^0.14.3",
    "typescript": "~4.3.5"
  "private": true,
  "name": "beauty-link",
  "version": "1.0.0"

try reverting to the last commit that you built at successfully. then diff the last working commit from your latest commit that is failing. try building on different commits between them until you narrow down the root cause and let us know.

alternatively, you can switch to our new build service that is easier to debug. EAS Build - Expo Documentation

Do either of you have an & sign in your app.json? e.g. in your app name?

Are you both building with expo build:android?

1 Like

i have one “&” in the android.config.googleMaps.apiKey.
I will try to build without the api key to see if it works

1 Like

it’s the first build.

Is it normal for the Google Maps API key to contain an ampersand? I thought they were alphanumeric.

1 Like

I confirm, the build is working the problem was a & in the api key.

Thank you a lot @wodin

1 Like

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