PathClassLoader Issue

已查看 115 次
跳至第一个未读帖子

MoggoDude

未读,
2008年10月16日 06:47:262008/10/16
收件人 Android Internals
Hi,
I was woundering if someone could help me on a technical issue
concerning the PathClassLoader in Android SDK 1.0.
The problem I'm and other people, see blog,
http://groups.google.com/group/android-developers/browse_thread/thread/ae71de8061c7eabf/c601569b1636f9dc?lnk=gst&q=PathclassLoader#c601569b1636f9dc,
have experienced arrises when attempting to dynamically load classes.
Using the example in the
blog:

PathClassLoader loader = new PathClassLoader(
"/data/data/org.beo/beo.mylib/myLib.apk",
ClassLoader.getSystemClassLoader());
Class calledClass = null;
calledClass = loader.loadClass("beo.mylib.beoware");

produces the following error:
ERROR/dalvikvm(312): Can't open dex cache
'/data/dalvik-cache/data@data.....@classes.dex': No such file or
directory
09-26 00:03:34.928: INFO/dalvikvm(312): Unable to open or create cache
for
/data/data/....................apk'

This is rectified by shelling into the emulator using the adb utility
and changing the permissions on
the directory /data/dalvik-cache using chmod 777 .

The main concern I have is, what will be the permissions /data/dalvik-
cache on on a target device, such as the new HTC G1 phone ?
Users of any application using the PathClassLoader will propably not
be able to issues chmod 777 commands (can't expect them
to either). Consequently, this would render applications relying on
PathClassLoader inoperable. If anyone can help me with this issue,
it would be very greatly appreciated.

Regards,
MoggoDude

hackbod

未读,
2008年10月16日 16:48:522008/10/16
收件人 Android Internals
Sorry, this is not supported for 1.0.

On Oct 16, 3:47 am, MoggoDude <chris.tucke...@gmail.com> wrote:
> Hi,
>      I was woundering if someone could help me on a technical issue
> concerning the PathClassLoader in Android SDK 1.0.
> The problem I'm and other people, see blog,http://groups.google.com/group/android-developers/browse_thread/threa...,

MoggoDude

未读,
2008年10月17日 07:40:252008/10/17
收件人 Android Internals
Hi hackbod,
Thanks for your response. I just have a couple of questions
regarding your response, if you
could please answer, it would be greatly appreciated.

1) Why is this feature (Dynamic Class Loading) not supported in sdk
1.0. This is a crucial feature
required by some application.
2) Will it be supported on a target device such as the HTC G1 when it
is
lauched to the market soon.


Regards,
MoggoDude

hackbod

未读,
2008年10月19日 14:10:292008/10/19
收件人 Android Internals
On Oct 17, 4:40 am, MoggoDude <chris.tucke...@gmail.com> wrote:
> 1) Why is this feature (Dynamic Class Loading) not supported in sdk

Because we didn't have time to implement it.

> 1.0. This is a crucial feature
>    required by some application.

Sorry.

> 2) Will it be supported on a target device such as the HTC G1 when it
> is
>    lauched to the market soon.

No, it is not supported in 1.0.
回复全部
回复作者
转发
0 个新帖子