What are the list of android specific exceptions?

跟風遠走 提交于 2019-12-07 10:12:45

问题


I know some of exceptions are thrown by Android framework. Like ActivityNotFoundException, WindowManager.BadTokenException.

But i am not aware of all other exceptions which are specific to android framework.

Can anybody list possible android framework specific exceptions with a small description. Or suggest me blogs information which contains the required information.

Thanks in advance.


回答1:


http://developer.android.com/reference/java/lang/Exception.html I think here you can find it, "Known Indirect Subclasses", totally 224 exceptions. Only choose the one started by "Android", here are about 72 exceptions, these should be the list

android.content.ActivityNotFoundException
android.util.AndroidRuntimeException
android.accounts.AuthenticatorException
android.os.BadParcelableException
android.util.Base64DataException
android.hardware.camera2.CameraAccessException
android.database.CursorIndexOutOfBoundsException
android.os.DeadObjectException
android.media.DeniedByServerException
android.support.v4.app.Fragment.InstantiationException
android.opengl.GLException
android.view.InflateException
android.content.IntentFilter.MalformedMimeTypeException
android.content.IntentSender.SendIntentException
android.view.KeyCharacterMap.UnavailableException
android.security.keystore.KeyExpiredException
android.security.keystore.KeyNotYetValidException
android.security.keystore.KeyPermanentlyInvalidatedException
android.util.MalformedJsonException
android.media.MediaCodec.CodecException
android.media.MediaCodec.CryptoException
android.media.MediaDrm.MediaDrmStateException
android.media.MediaDrmResetException
android.accounts.NetworkErrorException
android.os.NetworkOnMainThreadException
android.util.NoSuchPropertyException
android.media.NotProvisionedException
android.support.v4.os.OperationCanceledException
android.content.pm.PackageManager.NameNotFoundException
android.os.ParcelFileDescriptor.FileDescriptorDetachedException
android.os.ParcelFormatException
android.net.ParseException
android.app.PendingIntent.CanceledException
android.support.v8.renderscript.RSDriverException
android.support.v8.renderscript.RSIllegalArgumentException
android.support.v8.renderscript.RSInvalidStateException
android.support.v8.renderscript.RSRuntimeException
android.content.ReceiverCallNotAllowedException
android.os.RemoteException
android.widget.RemoteViews.ActionException
android.media.ResourceBusyException
android.content.res.Resources.NotFoundException
android.database.SQLException
android.database.sqlite.SQLiteAbortException
android.database.sqlite.SQLiteAccessPermException
android.database.sqlite.SQLiteBindOrColumnIndexOutOfRangeException
android.database.sqlite.SQLiteBlobTooBigException
android.database.sqlite.SQLiteCantOpenDatabaseException
android.database.sqlite.SQLiteConstraintException
android.database.sqlite.SQLiteDatabaseCorruptException
android.database.sqlite.SQLiteDatabaseLockedException
android.database.sqlite.SQLiteDatatypeMismatchException
android.database.sqlite.SQLiteDiskIOException
android.database.sqlite.SQLiteDoneException
android.database.sqlite.SQLiteException
android.database.sqlite.SQLiteFullException
android.database.sqlite.SQLiteMisuseException
android.database.sqlite.SQLiteOutOfMemoryException
android.database.sqlite.SQLiteReadOnlyDatabaseException
android.database.sqlite.SQLiteTableLockedException
android.provider.Settings.SettingNotFoundException
android.database.StaleDataException
android.view.Surface.OutOfResourcesException
android.view.SurfaceHolder.BadSurfaceTypeException
android.nfc.TagLostException
android.util.TimeFormatException
android.os.TransactionTooLargeException
android.media.UnsupportedSchemeException
android.security.keystore.UserNotAuthenticatedException
android.view.WindowManager.BadTokenException
android.view.WindowManager.LayoutParams#token
android.view.WindowManager.InvalidDisplayException



回答2:


The following are the exceptions that are supported by Android:

1.) InflateException : This exception is thrown When an error conditions are occurred.

2.) Surface.OutOfResourceException: This exception is thrown When a surface is not created or resized.

3.) SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS

4.) WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.



来源:https://stackoverflow.com/questions/33011319/what-are-the-list-of-android-specific-exceptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!