I am developing an Android application that uses the Reflections library to search for some annotated classes.
After some debugging hours spent trying to figure out why this library always returned empty sets to every query I did, I found out that the method getResources("foo/bar/")
of ClassLoader
returns an empty Enumeration.
I used several ClassLoaders besides the one returned by android.context.Context.getClassLoader()
, including DexClassLoader
and PathClassLoader
.
In the latter two, I input the APK saved at /data/app
.