AHActionBar Initialization Error

SCIS

Active Member
Licensed User
Longtime User
When debugging, we get an exception "Program paused on line: 61 Dropmenu.Initialize("AC")".

In the Local Variables box on the bottom right (not sure what to call it), it says "LocalLastException android.content.res.Resources$No​​tFoundException: Resource ID #0x0" in red.

Here's the code: B4A SCIS AHActionBar - Pastebin.com

Thanks in advance,
SCIS
 

Ohanian

Active Member
Licensed User
Longtime User
When debugging, we get an exception "Program paused on line: 61 Dropmenu.Initialize("AC")".

In the Local Variables box on the bottom right (not sure what to call it), it says "LocalLastException android.content.res.Resources$No​​tFoundException: Resource ID #0x0" in red.

Here's the code: B4A SCIS AHActionBar - Pastebin.com

Thanks in advance,
SCIS

Maybe you forgot to copy the required resources:

Copy the whole "res" directory structure to the "Objects" directory of your B4A project and VERY IMPORTANT: make all the files in it READ ONLY! Otherwise B4A will delete them when compiling. After you make any change to the Objects/res directory use "Clean project" menu item in B4A to force the compiler to recreate the R.java file.

If you forget to make the resource files read only then you will most likely get a ResourceNotFound exception when you try to use the ActionBar.

- Copy the res directory structure to <Your project folder>\Objects\res
- Make all files in <Your project folder>\Objects\res\xxx read only
 
Upvote 0

SCIS

Active Member
Licensed User
Longtime User
Thanks, that worked. I had already copied the files but forgot to enable read-only. :)
 
Upvote 0

SCIS

Active Member
Licensed User
Longtime User
I'm not, and we just found out it probably has something to do with my b4a (although it's updated and all). It does work on my mate's computer for whatever reason...
 
Upvote 0
Top