Android build failed using eas build on SDK 45.
See original GitHub issueSummary
I upgraded my expo project to expo 45.0.0
from expo 41.0.0
.
While building the project using the command eas build -p android
, it fails with the below errors.
However, the ios build is fine.
Error Output:
FAILED
Execution optimizations have been disabled for task ':app:processReleaseMainManifest' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/home/expo/workingdir/build/android/app/build/intermediates/navigation_json/release/navigation.json'. Reason: Task ':app:processReleaseMainManifest' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
[stderr] /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml Error:
[stderr] android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:processReleaseMainManifest'.
[stderr] > Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 7m 58s
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
45
Environment
expo-env-info 1.0.3 environment info: System: OS: macOS 12.2.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node Yarn: 1.22.18 - ~/.yarn/bin/yarn npm: 8.5.4 - ~/Desktop/queue-app/node_modules/.bin/npm Watchman: 2021.06.07.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 30.0.2, 31.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8512546 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild npmPackages: babel-preset-expo: ~9.1.0 => 9.1.0 expo: ^45.0.0 => 45.0.0 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-web: 0.17.7 => 0.17.7 react-navigation: ^4.1.0 => 4.4.4 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 5.4.3 Expo Workflow: managed
Reproducible demo
- Upgrade your expo project from SDK 41 to SDK 45.
- Use the command
eas build -p android
to build the android app. - Build failed with the above error.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Our team is also experiencing this issue after upgrading to Expo 45
@mi-mazouz How do you add AndroidManifest.xml on Expo 45?
EDIT: To answer my own question, I had to eject expo from my project