I am trying to run a unit test in Eclipse. I followed Android FAQ (http://code.google.com/android/kb/troubleshooting.html#addjunit) to get JUnit working. Unfortunately, it works only if tested code does not reference any android classes. As soon as it does, I get the following exception, when running the test (if the class in question implements Parcelable):
Caused by: java.lang.ClassNotFoundException: android.os.Parcelable at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) ... 33 more I tried including android.jar file explicitly, but then I got an exception claiming that RectF (an instance variable in my class) is a stub. Anybody knows how to setup Eclipse to run a unit test with classes that either implement, extend or use android classes? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---