question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android build failed using eas build on SDK 45.

See original GitHub issue

Summary

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

  1. Upgrade your expo project from SDK 41 to SDK 45.
  2. Use the command eas build -p android to build the android app.
  3. Build failed with the above error.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
DJ-Icebearcommented, May 28, 2022

Our team is also experiencing this issue after upgrading to Expo 45

1reaction
uncommonjoecommented, Jun 24, 2022

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android build failed using eas build. · Issue #1101 · expo/eas-cli
- Gradle detected a problem with the following location: '/home/expo/workingdir/build/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this ...
Read more >
Expo 45 build fail on Android with EAS
I've upgraded the SDK version to 45 recently. Everything works well except it doesn't build either on Android or IO.
Read more >
Android build failed using eas build after upgrade SDK
While building the project using the command eas build --profile development --platform android , it fails with the above errors.
Read more >
Expo Status (@expo_status) / Twitter
Identified: We have implemented a workaround for Android builds on SDK 45 and ... If you are seeing a message like "Failed to...
Read more >
Upstream issue with React-Native release causing all Android ...
We are monitoring Android build results. IDENTIFIED at 11/04/2022 02:43PM. We have implemented a workaround for Android builds on SDK 45 and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found