"MainApplication does not exist in android project" error when building Expo managed project

Good day! I am new to Expo and am running into an issue with building my managed Expo project (that is using Expo 42).

I have successfully run eas build:config but when running eas build --platform android I run into the following error.

Prebuilding managed project
- Creating native project directories (./ios and ./android) and updating .gitignore
βœ” Created native project | /android already created
- Adding Metro bundler config
βœ” Added Metro config.
- Updating your package.json scripts, dependencies, and main file
βœ” Updated package.json and added index.js entry point for iOS and Android.
[15:29:29] β€Ί Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead.
- Config syncing
[stderr] [15:29:29] [android.dangerous]: withAndroidDangerousBaseMod: Project file "MainApplication" does not exist in android project for root "/build/workingdir/build"
[stderr] [15:29:29] AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Project file "MainApplication" does not exist in android project for root "/build/workingdir/build"

I am unsure to the meaning of this as I followed the Expo EAS setup documents and was wondering if someone could point me in the right direction.

I apologize if this is a noob question.

Thank you for your time!

Looks like you already had an existing android/ directory committed. Since it’s supposed to be a managed project- could you remove that (and commit the removal)?

1 Like

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