skip to Main Content

I am developing an app on react, and while building natively on android I am getting an error:

Task :app:mergeDebugResources
C:UsersUser.gradlecachestransforms-36bf5ab858a3d72c1e9396b1851be880etransformedjetified-play-services-base-18.1.0resvaluesvalues.xml:4:0: Invalid <color> for given resource value.

Task :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:mergeDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable`
Resource compilation failed (Failed to compile values resource file D:appSourceCodemobileandroidappbuildintermediatesincrementaldebugmergeDebugResourcesmerged.dirvaluesvalues.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@3be97b9c.). Check logs for more details.

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 1m 24s

Why does a third-party dependency show a markup error? If previous builds were successful before that?

Help me understand, please.

C:UsersUser.gradlecachestransforms-36bf5ab858a3d72c1e9396b1851be880etransformedjetified-play-services-base-18.1.0resvaluesvalues.xml:4:0: Invalid color for given resource value.

I tried gradlew clean, expo clear, retry prebuild, nothing help.

how values.xml look like:

    <?xml version="1.0" encoding='utf-8' standalone='no'?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- java/com/google/android/gmscore/integ/client/base/res/values/colors.xml -->
<eat-comment/>
<color name="common_google_signin_btn_text_dark_default">@android:color/white</color>
<color name="common_google_signin_btn_text_dark_disabled">#1F000000</color>
<color name="common_google_signin_btn_text_dark_focused">@android:color/black</color>
<color name="common_google_signin_btn_text_dark_pressed">@android:color/white</color>
<color name="common_google_signin_btn_text_light_default">#90000000</color>
<color name="common_google_signin_btn_text_light_disabled">#1F000000</color>
<color name="common_google_signin_btn_text_light_focused">#90000000</color>
<color name="common_google_signin_btn_text_light_pressed">#DE000000</color>
<!-- java/com/google/android/gmscore/integ/client/base/res/values/strings.xml -->
<eat-comment/>
<string name="common_google_play_services_enable_button" msgid="2523291102206661146">Enable</string>
<string name="common_google_play_services_enable_text" msgid="227660514972886228"><xliff:g id="app_name">%1$s</xliff:g> won't work unless you enable Google Play services.</string>
<string name="common_google_play_services_enable_title" msgid="5122002158466380389">Enable Google Play services</string>
<string name="common_google_play_services_install_button" msgid="7153882981874058840">Install</string>
<string name="common_google_play_services_install_text"><xliff:g id="app_name">%1$s</xliff:g> won't run without Google Play services, which are missing from your device.</string>
<string name="common_google_play_services_install_title" msgid="7215213145546190223">Get Google Play services</string>
<string name="common_google_play_services_notification_channel_name">Google Play services availability</string>
<string name="common_google_play_services_notification_ticker">Google Play services error</string>
<string name="common_google_play_services_unsupported_text"><xliff:g id="app_name">%1$s</xliff:g> won't run without Google Play services, which are not supported by your device.</string>
<string name="common_google_play_services_update_button" msgid="6556509956452265614">Update</string>
<string name="common_google_play_services_update_text" msgid="9053896323427875356"><xliff:g id="app_name">%1$s</xliff:g> won't run unless you update Google Play services.</string>
<string name="common_google_play_services_update_title" msgid="6006316683626838685">Update Google Play services</string>
<string name="common_google_play_services_updating_text"><xliff:g id="app_name">%1$s</xliff:g> won't run without Google Play services, which are currently updating.</string>
<string name="common_google_play_services_wear_update_text">New version of Google Play services needed. It will update itself shortly.</string>
<string name="common_open_on_phone">Open on phone</string>
<string name="common_signin_button_text">Sign in</string>
<string name="common_signin_button_text_long">Sign in with Google</string>
<!-- java/com/google/android/gmscore/integ/client/base/res/values/attrs.xml -->
<eat-comment/>
<declare-styleable name="LoadingImageView"><attr name="imageAspectRatioAdjust">
<enum name="none" value="0"/>

<enum name="adjust_width" value="1"/>

<enum name="adjust_height" value="2"/>

</attr>

<attr name="imageAspectRatio" format="float"/>

<attr name="circleCrop" format="boolean"/>
</declare-styleable>
<declare-styleable name="SignInButton"><attr name="buttonSize" format="reference">
<enum name="standard" value="0"/>

<enum name="wide" value="1"/>

<enum name="icon_only" value="2"/>

</attr>
<attr name="colorScheme" format="reference">
<enum name="dark" value="0"/>

<enum name="light" value="1"/>

<enum name="auto" value="2"/>

</attr>

<attr name="scopeUris" format="reference|string"/>
</declare-styleable>
</resources>

2

Answers


  1. Chosen as BEST ANSWER

    If it helps anyone, the problem is solved like this:

    In the App.js file and app.config.js file, I removed from the status bar and from splash screen the backgroundColor element which had the value transparent.


  2. Verify if there’s an updated version of the play-services-base library available that might have fixed this issue. Update your dependencies accordingly.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search