I'm wondering there i开发者_运维百科s the standard Java exceptions like NullPointerException, InvalidArgumentException, etc... I can't find them accessible under Android platform.
Why the Android implemented this way? And if I'm developing some shared Android library, am I need to write my own exceptions?
This link says that NullPointerException
(and many others) are available in even early versions of the API. Where are you looking for them that you aren't finding them?
Something must be broken in your setup.
The Android SDK contains the standard java exceptions in the usual place, in the java.lang package.
For example (Android 1.5): /platforms/android-3/android.jar
java.lang.NullPointerException
is part of the android API - the dalvik vm is based on inspired by apache harmony which is an open source implementation of Java.
精彩评论