Error running and uploading Android build with expo build:android -t app-bundle

Expo CLI 3.15.4 environment info:
OS: macOS 10.15.3
Shell: 5.7.1 - /bin/zsh
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.22.0 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
expo: ^36.0.0 => 36.0.2
react: 16.9.0 => 16.9.0
react-native: => 0.61.4
react-navigation: 3.11.1 => 3.11.1
expo-cli: 3.15.4

Running and uploading error with
expo build:android -t app-bundle

Upload failed

Your APK cannot be analyzed using aapt. Error output:

Failed to run aapt dump badging: ERROR: dump failed because no AndroidManifest.xml found

Building without flag -t app-bundle returns error message below

Unoptimized APK

This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users’ devices than it needs to be. Larger apps see lower install success rates and take up storage on users’ devices.

Use the Android App Bundle to automatically optimize for device configurations, or manage it yourself with multiple APKs

In your first post you are trying to upload app-bundle as apk. Upload type is recognized based on file extension, it should work correctly if you specify with one of those options

   --latest         uploads the latest build (default)
   --id <id>        id of the build to upload

but if you use

 --path <path>    path to the .apk file

and name your file incorrectly (should be .aab) expo upload will attempt to upload it as a wrong type and fail validation.

If fixing name won’t help please post what exact commands are you using and their output.

1 Like

Hi @wkozyra, fixing name / renaming as .aab helped - thanks!

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