Invoking activity that is located in a jar

Posted by Sebi on Stack Overflow See other posts from Stack Overflow or by Sebi
Published on 2010-04-30T09:55:10Z Indexed on 2010/04/30 9:57 UTC
Read the original article Hit count: 137

Filed under:

hi

i tried to invoke another activity from my main acitivty which is located in a jar file.

Class clazz = Class.forName(getPackageName() + "." + getActivityName()); startActivity(new Intent(this, clazz));

Im doing it this way because i only know the name of the class. This works fine but unfortunately, all resource files can't be found while loading the activity from the jar file. at the first occurence of loading a res file there is a ResourceNotFoundException:

04-30 11:18:46.944: ERROR/AndroidRuntime(1749): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f040006

any hints for that? thanks!

© Stack Overflow or respective owner

Related posts about android