react-native-unimodules icon indicating copy to clipboard operation
react-native-unimodules copied to clipboard

an Error occurred while building android

Open tranducduong1994 opened this issue 3 years ago • 9 comments

I followed this link to install react-native-unimodules in my project: https://docs.expo.dev/bare/installing-unimodules/#configuration-for-android

But terminal threw this error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     //android/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:184: AAPT: error: resource style/DeviceCredentialHandlerTheme (aka com.cer:style/DeviceCredentialHandlerTheme) not found.
         

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 30s

    at makeError (/Users/tranducduong/mobile/node_modules/execa/index.js:174:9)
    at /Users/duong/mobile/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runOnAllDevices (/Users/duong/mobile/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
    at async Command.handleAction (/Users/duong/mobile/node_modules/@react-native-community/cli/build/index.js:186:9)

I followed all of steps in the link, I don't know why this error occured. Thank you.

tranducduong1994 avatar Sep 10 '21 16:09 tranducduong1994

did the installation instruction miss the "DeviceCredentialHandlerTheme" step?

tranducduong1994 avatar Sep 11 '21 04:09 tranducduong1994

same error

hugoduchene avatar Sep 21 '21 10:09 hugoduchene

is anyone resolved this?

koyta avatar Jan 09 '22 22:01 koyta

I have the same issue...

hgndgn avatar Jan 27 '22 11:01 hgndgn

I updated all the packages with npm-check-updates and the build worked.

hgndgn avatar Feb 02 '22 13:02 hgndgn

The solution to the error is found in the following link: [Solution Here]

I copy the solution in case the link is lost:

[YouAPP name/android/app/src/main/AndroidManifest.xml

check the arrival name

chage with this android:theme="@style/DeviceCredentialHandlerTheme"

and check the app theme name in

YouAPP name/android/app/src/main/res/values/styles.xml change the name to error theme name its works for me try to run yarn android] Author: By Stone Hammer Danny Reichel at May 04 2021

CCB-cerivera avatar Feb 26 '22 05:02 CCB-cerivera

same error

chancesmith avatar May 02 '22 20:05 chancesmith

For me, running expo install expo-secure-store fixed the issue.

https://github.com/expo/expo/issues/17108#issuecomment-1102200109

jamonholmgren avatar May 11 '22 05:05 jamonholmgren

@jamonholmgren this right here is probably not related to expo in any way. Still, can you confirm what version did expo install expo-secure-store install for you and if you build on EAS?

ddinchev avatar May 27 '22 07:05 ddinchev