I’m trying out your new eas build service and I’m getting this error consistently on the Android build:
Build failed: Couldn’t find Android manifest at /build/workingdir/build/android/app/src/main/AndroidManifest.xml
This is on the build page at https://expo.io/. I can build locally, and the IOS version also works.
From expo diagnostics:
Expo CLI 4.3.0 environment info:
OS: macOS 11.2.2
Shell: 5.8 - /bin/zsh
Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
CocoaPods: 1.9.1 - /usr/local/bin/pod
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
API Levels: 29
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0
System Images: android-29 | Google APIs Intel x86 Atom
Android Studio: 4.0 AI-193.69184.108.40.20614223
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
expo: ~40.0.0 => 40.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: bare
The most recent build Id is 2d55d022-15b0-4bbe-8fca-91b0a6166404, but I tried a few times with the same result.
to be totally clear, if you run
yarn android locally it builds and runs as expected?
is your AndroidManifest somehow being left out of source control? we use git to create a shallow clone and then compress and upload it to be built. you can explore what is uploaded by running this in your project root:
git clone --local --no-hardlinks --depth 1 file:///`pwd` `pwd`/debug-project
this will clone your project into a directory called
debug-project. explore it to see if
AndroidManifest.xml exists at the path from the error message
I tried that and the AndroidManifest.xml was not copied over. I checked .gitignore and there is a line for /android/app/src/main/AndroidManifest.xml. Not sure how or why that is there if it shouldn’t be.
I’ll try removing that line from gitignore, commiting the AndroidManifest and building again.
that is certainly a strange thing to have in your gitignore, you could maybe check out how it got there via git blame
I was able to build the app once I fixed gitignore and added the manifest. Thanks so much! I’ll dig into the gitignore file and post here if anything seems suspicious.
Well, this exact thing happened to me as well.
Steps to reproduce:
(a) expo init
(b) expo eject
(c) eas build
Looks like expo eject auto creates the following entries in the .gitignore file including our friend AndroidManifest.xml
i can’t reproduce that. can you elaborate on the steps? i think you may be using an ancient version of expo-cli if you are somehow ending up with those paths in your gitignore after ejecting. you should always try to use the latest version.
(a) expo init
(b) expo eject
that resulted in this:
i then ran
eas build -p android and it succeeded.
notice that AndroidManifest.xml is present: nickparticle/AndroidManifest.xml at main · brentvatne/nickparticle · GitHub
another possibility here is that you didn’t commit the changes after ejecting.
eas build will commit any changes to files that are already tracked but any new files won’t be added. you need to add new files to git manually.
╰─$ eas build -p android
✔ Created @notbrent/oktest2 on Expo
✔ This app is not set up for building with EAS. Set it up now? … yes
Warning! Your git working tree is dirty.
It's recommended to commit all your changes before proceeding, so you can revert the changes made by this command if necessary.
✔ Would you like to proceed? … yes
✔ Generated eas.json
✔ Android project configured
✔ iOS project configured
✔ Can we commit these changes to git for you? › Yes
✔ Commit message: … Configure EAS Build
✔ Committed changes
Error: Build process requires clean git working tree, please commit all your changes and run `eas build` again
╰─$ gs 1 ↵
On branch main
(use "git add <file>..." to include in what will be committed)
we should maybe change that behavior to add new files also so you can just run those three commands one after the other, without any other commands, and have it work out of the box that’d be nice.
Hey Brent - you are right! This reproduce step is too simple and I rushed it without noticing the obvious issue Prior to this going wrong, I had ejected multiple times (git rm android) a few times in an effort to fix an unrelated SDK issue, but had committed the contents each time so it wasn’t this issue explicitly. I’ll review my bash history and see if I can figure out how the .gitignore file got into that state - whatever the OG thread poster did was probably the same path I took through some non-traditional route.