I'm trying to load a class file from a server and instatiante it using different class loaders, but without success.
I tried DexClassLoader
, URLClassLoader
and PathClassLoader
. Whatever I do, the only thing I get is a ClassNotFoundException
from loadClass
method.
First thing I do is to download:
- jar file that contains the class file and the sex file
- jar file that contains the class file but no sex file
- the naked class file
And store it to the apps private storage folder. Then I try to load the class with one of the ClassLoader
implementations mentioned above causing in:
Error: java.lang.ClassNotFoundException: Didn't find class "FormTestView" on path: DexPathList[[zip file "/data/data/[PACKAGE_NAME]/app_test_folder/test.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
Any idea?