What's in a name?
When structuring a project for a website or mobile app build we like to collate and organise our assets in a structure akin to the following:
_assets/ _css/ _fonts/ _images/ _js/ _templates/
Depending on how far we're able to dictate the naming convention/directory structure (based on the technologies we're working with and what rules they might enforce) this approach has served us quite well.
We double checked the file paths and the location of where the _assets directory and its resources were located - all was exactly as expected so what was going on? All that would display for our efforts was an unstyled template. Frustrating wasn't even close to describing how this situation felt.
No matter what we investigated nothing was amiss. If this was publishing to iOS then why the hell wasn't it working for Android??
Turns out we didn't quite check all of the output in the Ionic CLI during the android build/run process.
When we eventually did this little gem helped explain everything that we were seeing:
-package-resources: [aapt] Found modified input file [aapt] Creating full resource package... [aapt] (skipping dir '_assets' due to ANDROID_AAPT_IGNORE pattern '_*')
The problem was being caused by the directory naming convention of using an underscore prefix resulting in the directory and all its resources being ignored. That's why nothing was loading/rendering in the emulator or on the Android handset - due to the build rule the directory was being ignored!
All that time and confusion caused by a simple underscore prefix.