users who have found themselves in the situation of being unable to load a webview with files from a tree-structured assets folder beginning with api 30 have been reluctant to abandon that structure. it isn't absolutely necessary, and it doesn't take much for them to continue as if nothing has happened with api 30. since none of us knows what google will do next to restrict our movements in our own devices, i say let's enjoy life while we can
.
attached plus find 1 way to continue loading files in a webview from resources in the assets folder with one or more subfolders.
the op mentions: dirassets/subfolder/cat1/ as his "file" structure. i have duplicated that in my example. there is a screen capture showing that, as well as a screen cap of the result of loading 2 files from dirassets/subfolder/cat1: an html file and a .jpg. the app loads the html file, and the webview loads the image.
i tested with a device running android 12 / api 30 and on a device running android 9 / api 28. i also tried it on the android 12 device with api 28.