Expokit - Android ressource compilation failed SDK 31

#1

Hi,

I’m using android gradle plugin 3.2.1 and since this morning, I can’t build anymore.

Android studio throw this error:

error: inner element must either be a resource reference or empty

It seems android can’t build when the generated value.xml in the build is containing element with a body. Concerned lines are:

    <item name="cc_card" type="id">2222</item>
    <item name="cc_ccv" type="id">4444</item>
    <item name="cc_entry" type="id">1000</item>
    <item name="cc_entry_internal" type="id">3000</item>
    <item name="cc_exp" type="id">3333</item>
    <item name="cc_form_layout" type="id">1111</item>
    <item name="cc_four_digits" type="id">6666</item>
    <item name="cc_zip" type="id">5555</item>

Those ones seems to come from the Stripe park of the SDK

And this line also:

    <item name="text_helper" type="id">2000</item>

For example, every other lines look like:

    <item name="textinput_counter" type="id"/>
    <item name="textinput_error" type="id"/>
    <item name="title" type="id"/>
    <item name="transition_current_scene" type="id"/>
    <item name="transition_layout_save" type="id"/>
    <item name="transition_position" type="id"/>
    <item name="transition_scene_layoutid_cache" type="id"/>
    <item name="transition_transform" type="id"/>
    <item name="up" type="id"/>

SO link with similar problem: Android - Inner element must either be a resource reference or empty

Thank you for your time!

2 Likes
#2

I’ve found a workaround, just create a file called ids.xml in the folder res/values containing:

<resources>
  <item name="cc_card" type="id"/>
  <item name="cc_ccv" type="id"/>
  <item name="cc_entry" type="id"/>
  <item name="cc_entry_internal" type="id"/>
  <item name="cc_exp" type="id"/>
  <item name="cc_form_layout" type="id"/>
  <item name="cc_four_digits" type="id"/>
  <item name="cc_zip" type="id"/>
  <item name="text_helper" type="id"/>
</resources>

4 Likes
closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.