Android Question Error using resource file


Active Member
Licensed User
Longtime User

I would like to use the Material Design Toolbar from the Corwin42 tutorial with the current version of B4A.
The toolbar should display a search icon. Unfortunately I get this error message when loading the resource:

android.content.res.Resources$NotFoundException: Resource ID #0x0

I load them with the XmlLayoutBuilder:
bd = xml.GetDrawable("ic_search_white_24")
Activity.AddMenuItem3("Search", "Menu", bd.Bitmap, True)

I have tried several ways to include the resource:
  • stored once in the Object\res directory (read-only)
  • created an own directory and inserted it in B4A with the #AdditionalRes attribute

What else can I do?

Thank you.