Project with Expo SDK 44, expo-secure-store 11.1.0+ fails to build on EAS for Android
See original GitHub issueSummary
I’ve tried using expo-secure-store:11.1.1
(latest version at the time of writing which is installed when doing expo install expo-secure-store
) in a managed workflow expo app. When trying to build production Android build on EAS, the build fails with:
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:bundleReleaseResources'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr] > Android resource linking failed
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/bundle_manifest/release/AndroidManifest.xml:88: AAPT: error: resource style/DeviceCredentialHandlerTheme (aka com.xxx.app:style/DeviceCredentialHandlerTheme) not found.
I get the same error with 11.1.0
.
Solution
It builds OK with 11.0.1
. iOS build passes successfully in EAS for all tested versions (>=11.0.1). Dev builds work fine with any version.
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)
44.0.6
Environment
This is not from expo-env-info
, this is from EAS since EAS worker is the build environment:
Creating new worker instance
Using image "ubuntu-18.04-jdk-8-ndk-r19c" based on "ubuntu:bionic-20210930"
Installed software:
- NDK 19.2.5345600
- Node.js 16.13.2
- Yarn 1.22.17
- npm 8.1.2
- Java 8
- Expo CLI 5.3.0
Reproducible demo
EAS build ID that fails (maybe useful to Expo devs) is 3b600353-681e-4c94-8ea3-a263082d638b
.
Possible culprit is this PR https://github.com/expo/expo/pull/14512
It adds androidx.biometric:biometric:1.1.0
Android dependency which contains changes that are related to DeviceCredentialHandlerTheme
.
The Android build error is quite cryptic but some Google search results point out that a change should be done in the Android Manifest, for example: https://github.com/unimodules/react-native-unimodules/issues/176
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:11 (4 by maintainers)
Here is one solution for a managed app by using a config plugin:
In
app.json
add the following config plugin:Create
./expo-config-plugins/device-credential-handler-theme.js
with the following content:Build now passes with
expo-secure-plugin:11.2.0
.Thanks @ddinchev, it worked for us too.