I'm new to android and java. I have read but fail to understand clear description of getResource and getPath method, maybe because I'm not getting the results as desired. getResource method is in java.lang.Class and is used to get url of resource object if resource is there. In my case, I'm always getting null no matter what! I'm getting null for whatever string I pass (obviously, I place corresponding resource in current java file directory)
this.getClass().getResource(String "---")
always return null
and thus, getPath called on it gives null pointer exception. Is there an other way round? I'm developing android project. The java library I imported, uses this code to import config folder(xml configurations). What am i doing wrong? Please guide how paths are configured in java and android. (I'm using android studio as IDE)