Android Question Failed to generate resource table for split ''

RichyK68

Active Member
Licensed User
Longtime User
Hi,

I've not used B4A for a while now but kept it upgraded for a while and I own version 6.31 at the moment. I've revisited an old project, made a minor change to the code and tried to rebuild but I get this error:

B4A version: 6.31
Parsing code. (0.06s)
Compiling code. (1.93s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.79s)
Organizing libraries. (0.00s)
Generating R file. Error
Failed to generate resource table for split ''
res\values\styles.xml:4: error: Error: No resource found that matches the given name (at 'cardBackgroundColor' with value '?android:attr/colorBackgroundFloating').

Part of my manifest says

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="21"/>

Does anybody have any idea how to fix this so I can just build my apk?

Thanks all,

Richard
 

Anser

Well-Known Member
Licensed User
Longtime User
I am also facing the same issue. As Erel suggested, I updated to a newer android.jar D:\Android\platforms\android-27\android.jar

Unfortunately, this didn't resolve the error for me.

The following is the full error message that I get when I try to compile the project

B4A Version: 7.80
Parsing code. (0.10s)
Compiling code. (0.34s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.06s)
Organizing libraries. (0.00s)
Generating R file. Error
Failed to generate resource table for split ''
res\values\theme.xml:10: error: Error: No resource found that matches the given name (at 'textColorError' with value '@Color/design_textinput_error_color_light').


I am using B4A 7.80 This is the first time that I am trying to compile the already existing project with B4A 7.80, the project was working fine till the last B4A version. Meanwhile I updated the GUI SDK Manager for newer versions of Android tools as per the following post https://www.b4x.com/android/forum/t...ewer-versions-of-android-tools.80090/#content

Please note that I have the following line in my Main
#AdditionalRes: ..\resource

Here is my Manifest
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

'Setting up AppCompat Theme
SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="colorPrimary">#FF9800</item>
        <item name="colorPrimaryDark">#F57C00</item>
        <item name="colorAccent">#FFA726</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionModeOverlay">true</item>
        <item name="textColorError">@color/design_textinput_error_color_light</item>
    </style>
</resources>
)

AddPermission(android.permission.INTERNET)

'Required for DbUtils
AddManifestText(
<uses-permission
  android:name="android.permission.WRITE_EXTERNAL_STORAGE"
  android:maxSdkVersion="18" />
)

Any help will be appreciated.
 
Last edited:
Upvote 0

Anser

Well-Known Member
Licensed User
Longtime User
In the Manifest editor, in the CreateResource(), if I remove the following line,

<item name="textColorError">@color/design_textinput_error_color_light</item>

then I am able to compile.
B4X:
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="colorPrimary">#FF9800</item>
        <item name="colorPrimaryDark">#F57C00</item>
        <item name="colorAccent">#FFA726</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionModeOverlay">true</item>
        <item name="textColorError">@color/design_textinput_error_color_light</item>
    </style>
</resources>
)

I don't understand why this difference ?. Is there anything wrong the way that I am doing things ?. This was working fine till I changed to the new version OR till I updated to the GUI SDK manager. Not sure which one broke the existing code.

Also would like to know, what would be the equivalent code for this, so that I can use
<item name="textColorError">@color/design_textinput_error_color_light</item>
 
Upvote 0
Top