Stack Overflow archive
1 score

Android reflection to get HTML file in package

score
1
question views
44
license
CC BY-SA 3.0

Your code is compiled into a dex file inside your APK (classes.dex) and all resources are saved as a tree at the base of your APK. Because of this, ResourceBundle.getBundle(String) or getClass().getClassLoader().getResource(String) will return null.

On Android, you should be putting resources in assets or res/raw.

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.