Fadden, It throws these exceptions only when " I tried to create any UI component like Toast message or invoking phone dialer inents etc. " It executes nicely when I just "tried to print a log message or created MediaPlayer and playing a song " .
So my conclusion is that It throws NullPointerException only when invoked code has a UI component. Note: same thing I had tried using the normal desktop java application using swing and excuted nicely with UI component also. So Is this a bug in android or some other way to do it. Thanks, Asif On May 14, 3:28 am, fadden <[email protected]> wrote: > On May 13, 8:05 am, Asif k <[email protected]> wrote: > > > I had used DexClassLoader to execute the code of other application > > dynamically. I am calling method display() of another application from > > my application. The display() method will just show the Toast pop up. > [...] > > 05-13 20:10:22.336: WARN/System.err(773): Caused by: > > java.lang.NullPointerException > > 05-13 20:10:22.466: WARN/System.err(773): at > > android.content.ContextWrapper.getResources(ContextWrapper.java:79) > > 05-13 20:10:22.466: WARN/System.err(773): at > > android.widget.Toast.<init>(Toast.java:88) > > 05-13 20:10:22.477: WARN/System.err(773): at > > android.widget.Toast.makeText(Toast.java:230) > > 05-13 20:10:22.485: WARN/System.err(773): ... 25 more > > > Please Help. Am I missing something?? > > Looks like it was doing something and then hit a null pointer > exception? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

