Now I got the classes loaded using simple code like this:
DexFile df = new DexFile(new File("/data/app/com.my.internal.apk"));
ClassLoader cl = getClassLoader();
Log.i("class loader *****", "" + cl);
Class clazz = df.loadClass("com/my/internal/
SystemProperties", cl);
Log.i("class &&&&&&", "" + clazz);*/
This is all good except DexClassLoader still doesn't work. Sorry, the
previous naming inconsistency is my unsuccessful effort to hide the
real project name in public domain.
Now I have the classes loaded using the above simple classloader, I
need to move on to get the class methods and invoke them. I'll leave
the DexClassLoader issue for now.
Thanks for all the help!
Sherry
On May 29, 3:30 pm, fadden <[email protected]> wrote:
> On May 29, 1:10 pm, sherry <[email protected]> wrote:
>
> > I got "ClassNotFoundException". By peeking into the apk, I don't see
> > class files but classes.dex. I would assume SystemProperties class is
> > in classes.dex. Why can I load it?
>
> You wrote this:
>
> dLoader.loadClass ("com.my.internal.SystemProperties");
>
> dexdump showed this:
>
> Lcom/sprint/internal/SystemProperties;
>
> Shouldn't that be "com.sprint.internal.SystemProperties" in your code?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---