I would venture a guess that's because of having to provide the same services to native apps.
Since native apps don't use Java, APIs have to be implemented at a lower level - or else would have to be duplicated for Java and native code. 13 мая, 2010 9:30 PM пользователь "Manfred Moser" <mosa...@gmail.com> написал: Hi! I am trying to figure out a way to run unit tests with some android provided classes (e.g. org.json). I would like to be able to run these outside the emulator for performance reasons. The only way I can think of at this stage is to have a separate module that uses org.json (not the android one) that runs all the tests and so that I then include in my android project. The problem is that if I try to use the android jar (including the provided) in my tests all methods will throw exceptions (well know fact..) Now I am just trying to understand why this is the case. My hunch is that the android.jar implementation classes are pretty tightly coupled to the underlying archticture and libraries (e.g. via jni to opencore, opengl and so on and son) and it would be a pretty difficult task to unbundle this all and make it run on the jvm rather then the android stack with the dalvik vm. Can somebody confirm it I am right or totally wrong? Is there a chance that at least some stuff can be tested outside if I create a android jar that contains the actual implementations by building android open source or is this all going to end in a huge misery for myself? manfred -- 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<android-developers%2bunsubscr...@googlegroups.com> For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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