Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# RuntimeException

```
open class RuntimeException : Exception
```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/kotlin/java/lang/Exception) ||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/kotlin/java/lang/RuntimeException#) |

|---|
| Known Direct Subclasses [AconfigStorageReadException](https://developer.android.com/reference/kotlin/android/os/flagging/AconfigStorageReadException.html#), [ActivityNotFoundException](https://developer.android.com/reference/kotlin/android/content/ActivityNotFoundException.html#), [AndroidRuntimeException](https://developer.android.com/reference/kotlin/android/util/AndroidRuntimeException.html#), [AnnotationTypeMismatchException](https://developer.android.com/reference/kotlin/java/lang/annotation/AnnotationTypeMismatchException), [ArithmeticException](https://developer.android.com/reference/kotlin/java/lang/ArithmeticException), [ArrayStoreException](https://developer.android.com/reference/kotlin/java/lang/ArrayStoreException), [BufferOverflowException](https://developer.android.com/reference/kotlin/java/nio/BufferOverflowException.html#), [BufferUnderflowException](https://developer.android.com/reference/kotlin/java/nio/BufferUnderflowException.html#), [CallEndpointException](https://developer.android.com/reference/kotlin/android/telecom/CallEndpointException.html#), [CallException](https://developer.android.com/reference/kotlin/android/telecom/CallException.html#), [ClassCastException](https://developer.android.com/reference/kotlin/java/lang/ClassCastException), [CompanionException](https://developer.android.com/reference/kotlin/android/companion/CompanionException.html#), and 65 others. |---|---| | [AconfigStorageReadException](https://developer.android.com/reference/kotlin/android/os/flagging/AconfigStorageReadException.html#) | Exception thrown when an error occurs while reading from Aconfig Storage. | | [ActivityNotFoundException](https://developer.android.com/reference/kotlin/android/content/ActivityNotFoundException.html#) | This exception is thrown when a call to android. | | [AndroidRuntimeException](https://developer.android.com/reference/kotlin/android/util/AndroidRuntimeException.html#) | Base class for all unchecked exceptions thrown by the Android frameworks. | | [AnnotationTypeMismatchException](https://developer.android.com/reference/kotlin/java/lang/annotation/AnnotationTypeMismatchException) | Thrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized). | | [ArithmeticException](https://developer.android.com/reference/kotlin/java/lang/ArithmeticException) | Thrown when an exceptional arithmetic condition has occurred. | | [ArrayStoreException](https://developer.android.com/reference/kotlin/java/lang/ArrayStoreException) | Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. | | [BufferOverflowException](https://developer.android.com/reference/kotlin/java/nio/BufferOverflowException.html#) | Unchecked exception thrown when a relative *put* operation reaches the target buffer's limit. | | [BufferUnderflowException](https://developer.android.com/reference/kotlin/java/nio/BufferUnderflowException.html#) | Unchecked exception thrown when a relative *get* operation reaches the source buffer's limit. | | [CallEndpointException](https://developer.android.com/reference/kotlin/android/telecom/CallEndpointException.html#) | This class represents a set of exceptions that can occur when requesting a `https://developer.android.com/reference/kotlin/android/telecom/CallEndpoint.html#` change. | | [CallException](https://developer.android.com/reference/kotlin/android/telecom/CallException.html#) | This class defines exceptions that can be thrown when using Telecom APIs with `https://developer.android.com/reference/kotlin/android/os/OutcomeReceiver.html#`s. | | [ClassCastException](https://developer.android.com/reference/kotlin/java/lang/ClassCastException) | Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. | | [CompanionException](https://developer.android.com/reference/kotlin/android/companion/CompanionException.html#) | `CompanionException` can be thrown during the companion system data transfer process. | | [CompletionException](https://developer.android.com/reference/kotlin/java/util/concurrent/CompletionException.html#) | Exception thrown when an error or other exception is encountered in the course of completing a result or task. | | [ConcurrentModificationException](https://developer.android.com/reference/kotlin/java/util/ConcurrentModificationException.html#) | This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible. | | [CursorWindowAllocationException](https://developer.android.com/reference/kotlin/android/database/CursorWindowAllocationException.html#) | This exception is thrown when a CursorWindow couldn't be allocated, most probably due to memory not being available. | | [DOMException](https://developer.android.com/reference/kotlin/org/w3c/dom/DOMException.html#) | DOM operations only raise exceptions in "exceptional" circumstances, i. | | [DateTimeException](https://developer.android.com/reference/kotlin/java/time/DateTimeException.html#) | Exception used to indicate a problem while calculating a date-time. | | [DeviceNotAssociatedException](https://developer.android.com/reference/kotlin/android/companion/DeviceNotAssociatedException.html#) | An exception for a case when a given device was not android. | | [EmptyStackException](https://developer.android.com/reference/kotlin/java/util/EmptyStackException.html#) | Thrown by methods in the `Stack` class to indicate that the stack is empty. | | [EnumConstantNotPresentException](https://developer.android.com/reference/kotlin/java/lang/EnumConstantNotPresentException) | Thrown when an application tries to access an enum constant by name and the enum type contains no constant with the specified name. | | [FileSystemAlreadyExistsException](https://developer.android.com/reference/kotlin/java/nio/file/FileSystemAlreadyExistsException.html#) | Runtime exception thrown when an attempt is made to create a file system that already exists. | | [FileSystemNotFoundException](https://developer.android.com/reference/kotlin/java/nio/file/FileSystemNotFoundException.html#) | Runtime exception thrown when a file system cannot be found. | | [FileUriExposedException](https://developer.android.com/reference/kotlin/android/os/FileUriExposedException.html#) | The exception that may be thrown when an application exposes a `file://` `https://developer.android.com/reference/kotlin/android/net/Uri.html#` to another app. | | [GLException](https://developer.android.com/reference/kotlin/android/opengl/GLException.html#) | An exception class for OpenGL errors. | | [HealthConnectException](https://developer.android.com/reference/kotlin/android/health/connect/HealthConnectException.html#) | Class representing health connect exceptions. | | [ICUUncheckedIOException](https://developer.android.com/reference/kotlin/android/icu/util/ICUUncheckedIOException.html#) | Unchecked version of `https://developer.android.com/reference/kotlin/java/io/IOException.html#`. | | [IllegalArgumentException](https://developer.android.com/reference/kotlin/java/lang/IllegalArgumentException) | Thrown to indicate that a method has been passed an illegal or inappropriate argument. | | [IllegalCallerException](https://developer.android.com/reference/kotlin/java/lang/IllegalCallerException) | Thrown to indicate that a method has been called by an inappropriate caller. | | [IllegalMonitorStateException](https://developer.android.com/reference/kotlin/java/lang/IllegalMonitorStateException) | Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor. | | [IllegalStateException](https://developer.android.com/reference/kotlin/java/lang/IllegalStateException) | Signals that a method has been invoked at an illegal or inappropriate time. | | [IllformedLocaleException](https://developer.android.com/reference/kotlin/java/util/IllformedLocaleException.html#) | Thrown by methods in `https://developer.android.com/reference/kotlin/java/util/Locale.html#` and `https://developer.android.com/reference/kotlin/java/util/Locale.Builder.html#` to indicate that an argument is not a well-formed BCP 47 tag. | | [IllformedLocaleException](https://developer.android.com/reference/kotlin/android/icu/util/IllformedLocaleException.html#) | Thrown by methods in `https://developer.android.com/reference/kotlin/android/icu/util/ULocale.html#` and `https://developer.android.com/reference/kotlin/android/icu/util/ULocale.Builder.html#` to indicate that an argument is not a well-formed BCP 47 tag. | | [IncompleteAnnotationException](https://developer.android.com/reference/kotlin/java/lang/annotation/IncompleteAnnotationException) | Thrown to indicate that a program has attempted to access an element of an annotation interface that was added to the annotation interface definition after the annotation was compiled (or serialized). | | [IndexOutOfBoundsException](https://developer.android.com/reference/kotlin/java/lang/IndexOutOfBoundsException) | Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range. | | [InflateException](https://developer.android.com/reference/kotlin/android/view/InflateException.html#) | This exception is thrown by an inflater on error conditions. | | [InspectionCompanion.UninitializedPropertyMapException](https://developer.android.com/reference/kotlin/android/view/inspector/InspectionCompanion.UninitializedPropertyMapException.html#) | Thrown by `https://developer.android.com/reference/kotlin/android/view/inspector/InspectionCompanion.html#readProperties(android.view.inspector.InspectionCompanion.T,%20android.view.inspector.PropertyReader)` if called before `https://developer.android.com/reference/kotlin/android/view/inspector/InspectionCompanion.html#mapProperties(android.view.inspector.PropertyMapper)`. | | [LSException](https://developer.android.com/reference/kotlin/org/w3c/dom/ls/LSException.html#) | Parser or write operations may throw an `LSException` if the processing is stopped. | | [MalformedParameterizedTypeException](https://developer.android.com/reference/kotlin/java/lang/reflect/MalformedParameterizedTypeException) | Thrown when a semantically malformed parameterized type is encountered by a reflective method that needs to instantiate it. | | [MalformedParametersException](https://developer.android.com/reference/kotlin/java/lang/reflect/MalformedParametersException) | Thrown when `https://developer.android.com/reference/kotlin/java/lang/reflect/Executable#getParameters()` attempts to read method parameters from a class file and determines that one or more parameters are malformed. | | [MatchException](https://developer.android.com/reference/kotlin/java/lang/MatchException) | Thrown to indicate an unexpected failure in pattern matching. | | [MediaCodec.CryptoException](https://developer.android.com/reference/kotlin/android/media/MediaCodec.CryptoException.html#) | Thrown when a crypto error occurs while queueing a secure input buffer. | | [MediaCodec.IncompatibleWithBlockModelException](https://developer.android.com/reference/kotlin/android/media/MediaCodec.IncompatibleWithBlockModelException.html#) | Thrown when the codec is configured for block model and an incompatible API is called. | | [MediaCodec.InvalidBufferFlagsException](https://developer.android.com/reference/kotlin/android/media/MediaCodec.InvalidBufferFlagsException.html#) | Thrown when a buffer is marked with an invalid combination of flags (e.g. both | | [MediaDrm.SessionException](https://developer.android.com/reference/kotlin/android/media/MediaDrm.SessionException.html#) | `https://developer.android.com/reference/kotlin/android/media/MediaDrm.SessionException.html#` is a misnomer because it may occur in methods **without** a session context. | | [MissingResourceException](https://developer.android.com/reference/kotlin/java/util/MissingResourceException.html#) | Signals that a resource is missing. | | [NegativeArraySizeException](https://developer.android.com/reference/kotlin/java/lang/NegativeArraySizeException) | Thrown if an application tries to create an array with negative size. | | [NetworkOnMainThreadException](https://developer.android.com/reference/kotlin/android/os/NetworkOnMainThreadException.html#) | The exception that is thrown when an application attempts to perform a networking operation on its main thread. | | [NoSuchElementException](https://developer.android.com/reference/kotlin/java/util/NoSuchElementException.html#) | Thrown by various accessor methods to indicate that the element being requested does not exist. | | [NoSuchPropertyException](https://developer.android.com/reference/kotlin/android/util/NoSuchPropertyException.html#) | Thrown when code requests a `https://developer.android.com/reference/kotlin/android/util/Property.html#` on a class that does not expose the appropriate method or field. | | [NullPointerException](https://developer.android.com/reference/kotlin/java/lang/NullPointerException) | Thrown when an application attempts to use `null` in a case where an object is required. | | [OperationCanceledException](https://developer.android.com/reference/kotlin/android/os/OperationCanceledException.html#) | An exception type that is thrown when an operation in progress is canceled. | | [ParcelFormatException](https://developer.android.com/reference/kotlin/android/os/ParcelFormatException.html#) | The contents of a Parcel (usually during unmarshalling) does not contain the expected data. | | [ParseException](https://developer.android.com/reference/kotlin/android/net/ParseException.html#) | Thrown when parsing failed. | | [PropertyMapper.PropertyConflictException](https://developer.android.com/reference/kotlin/android/view/inspector/PropertyMapper.PropertyConflictException.html#) | Thrown from a map method if a property name is already mapped as different type. | | [PropertyReader.PropertyTypeMismatchException](https://developer.android.com/reference/kotlin/android/view/inspector/PropertyReader.PropertyTypeMismatchException.html#) | Thrown if a client calls a typed read method for a property of a different type. | | [ProviderException](https://developer.android.com/reference/kotlin/java/security/ProviderException.html#) | A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors. | | [ProviderNotFoundException](https://developer.android.com/reference/kotlin/java/nio/file/ProviderNotFoundException.html#) | Runtime exception thrown when a provider of the required type cannot be found. | | [QueryLocationException](https://developer.android.com/reference/kotlin/android/telecom/QueryLocationException.html#) | This class represents a set of exceptions that can occur when requesting a `https://developer.android.com/reference/kotlin/android/telecom/Connection.html#queryLocationForEmergency(kotlin.Long,%20kotlin.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver)` | | [RSRuntimeException](https://developer.android.com/reference/kotlin/android/renderscript/RSRuntimeException.html#) | Base class for all exceptions thrown by the Android RenderScript | | [RejectedExecutionException](https://developer.android.com/reference/kotlin/java/util/concurrent/RejectedExecutionException.html#) | Exception thrown by an `https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#` when a task cannot be accepted for execution. | | [RemoteViews.ActionException](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.ActionException.html#) | Exception to send when something goes wrong executing an action | | [Resources.NotFoundException](https://developer.android.com/reference/kotlin/android/content/res/Resources.NotFoundException.html#) | This exception is thrown by the resource APIs when a requested resource can not be found. | | [SQLException](https://developer.android.com/reference/kotlin/android/database/SQLException.html#) | An exception that indicates there was an error with SQL parsing or execution. | | [SecurityException](https://developer.android.com/reference/kotlin/java/lang/SecurityException) | Thrown by the security manager to indicate a security violation. | | [StaleDataException](https://developer.android.com/reference/kotlin/android/database/StaleDataException.html#) | This exception is thrown when a Cursor contains stale data and must be requeried before being used again. | | [Surface.OutOfResourcesException](https://developer.android.com/reference/kotlin/android/view/Surface.OutOfResourcesException.html#) | Exception thrown when a Canvas couldn't be locked with `https://developer.android.com/reference/kotlin/android/view/Surface.html#lockCanvas(android.graphics.Rect)`, or when a SurfaceTexture could not successfully be allocated. | | [SurfaceHolder.BadSurfaceTypeException](https://developer.android.com/reference/kotlin/android/view/SurfaceHolder.BadSurfaceTypeException.html#) | Exception that is thrown from #lockCanvas when called on a Surface whose type is SURFACE_TYPE_PUSH_BUFFERS. | | [TimeFormatException](https://developer.android.com/reference/kotlin/android/util/TimeFormatException.html#) | <br /> | | [TypeNotPresentException](https://developer.android.com/reference/kotlin/java/lang/TypeNotPresentException) | Thrown when an application tries to access a type using a string representing the type's name, but no definition for the type with the specified name can be found. | | [UncheckedIOException](https://developer.android.com/reference/kotlin/java/io/UncheckedIOException.html#) | Wraps an `https://developer.android.com/reference/kotlin/java/io/IOException.html#` with an unchecked exception. | | [UndeclaredThrowableException](https://developer.android.com/reference/kotlin/java/lang/reflect/UndeclaredThrowableException) | Thrown by a method invocation on a proxy instance if its invocation handler's `https://developer.android.com/reference/kotlin/java/lang/reflect/InvocationHandler#invoke(kotlin.Any,%20java.lang.reflect.Method,%20kotlin.Array)` method throws a checked exception (a `Throwable` that is not assignable to `RuntimeException` or `Error`) that is not assignable to any of the exception types declared in the `throws` clause of the method that was invoked on the proxy instance and dispatched to the invocation handler. | | [UnsupportedOperationException](https://developer.android.com/reference/kotlin/java/lang/UnsupportedOperationException) | Thrown to indicate that the requested operation is not supported. | | [UserManager.UserOperationException](https://developer.android.com/reference/kotlin/android/os/UserManager.UserOperationException.html#) | Thrown to indicate user operation failed. | | [WindowManager.BadTokenException](https://developer.android.com/reference/kotlin/android/view/WindowManager.BadTokenException.html#) | Exception that is thrown when trying to add view whose `https://developer.android.com/reference/kotlin/android/view/WindowManager.LayoutParams.html#` `https://developer.android.com/reference/kotlin/android/view/WindowManager.LayoutParams.html#token:android.os.IBinder` is invalid. | | [WindowManager.InvalidDisplayException](https://developer.android.com/reference/kotlin/android/view/WindowManager.InvalidDisplayException.html#) | Exception that is thrown when calling `https://developer.android.com/reference/kotlin/android/view/ViewManager.html#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)` to a secondary display that cannot be found. | | [WrongMethodTypeException](https://developer.android.com/reference/kotlin/java/lang/invoke/WrongMethodTypeException) | Thrown to indicate that code has attempted to call a method handle via the wrong method type. | | [WrongThreadException](https://developer.android.com/reference/kotlin/java/lang/WrongThreadException) | Thrown to indicate that a method has been called on the wrong thread. | |

|---|
| Known Indirect Subclasses [AcceptPendingException](https://developer.android.com/reference/kotlin/java/nio/channels/AcceptPendingException.html#), [AccessControlException](https://developer.android.com/reference/kotlin/java/security/AccessControlException.html#), [AlreadyBoundException](https://developer.android.com/reference/kotlin/java/nio/channels/AlreadyBoundException.html#), [AlreadyConnectedException](https://developer.android.com/reference/kotlin/java/nio/channels/AlreadyConnectedException.html#), [ArrayIndexOutOfBoundsException](https://developer.android.com/reference/kotlin/java/lang/ArrayIndexOutOfBoundsException), [AuthenticationRequiredException](https://developer.android.com/reference/kotlin/android/app/AuthenticationRequiredException.html#), [BackendBusyException](https://developer.android.com/reference/kotlin/android/security/keystore/BackendBusyException.html#), [BackgroundServiceStartNotAllowedException](https://developer.android.com/reference/kotlin/android/app/BackgroundServiceStartNotAllowedException.html#), [BadParcelableException](https://developer.android.com/reference/kotlin/android/os/BadParcelableException.html#), [CancellationException](https://developer.android.com/reference/kotlin/java/util/concurrent/CancellationException.html#), [CancelledKeyException](https://developer.android.com/reference/kotlin/java/nio/channels/CancelledKeyException.html#), [ClosedDirectoryStreamException](https://developer.android.com/reference/kotlin/java/nio/file/ClosedDirectoryStreamException.html#), and 91 others. |---|---| | [AcceptPendingException](https://developer.android.com/reference/kotlin/java/nio/channels/AcceptPendingException.html#) | Unchecked exception thrown when an attempt is made to initiate an accept operation on a channel and a previous accept operation has not completed. | | [AccessControlException](https://developer.android.com/reference/kotlin/java/security/AccessControlException.html#) | This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied. | | [AlreadyBoundException](https://developer.android.com/reference/kotlin/java/nio/channels/AlreadyBoundException.html#) | Unchecked exception thrown when an attempt is made to bind the socket a network oriented channel that is already bound. | | [AlreadyConnectedException](https://developer.android.com/reference/kotlin/java/nio/channels/AlreadyConnectedException.html#) | Unchecked exception thrown when an attempt is made to connect a `https://developer.android.com/reference/kotlin/java/nio/channels/SocketChannel.html#` that is already connected. | | [ArrayIndexOutOfBoundsException](https://developer.android.com/reference/kotlin/java/lang/ArrayIndexOutOfBoundsException) | Thrown to indicate that an array has been accessed with an illegal index. | | [AuthenticationRequiredException](https://developer.android.com/reference/kotlin/android/app/AuthenticationRequiredException.html#) | Specialization of `https://developer.android.com/reference/kotlin/java/lang/SecurityException` that is thrown when authentication is needed from the end user before viewing the content. | | [BackendBusyException](https://developer.android.com/reference/kotlin/android/security/keystore/BackendBusyException.html#) | Indicates a transient error that prevented a key operation from being created. | | [BackgroundServiceStartNotAllowedException](https://developer.android.com/reference/kotlin/android/app/BackgroundServiceStartNotAllowedException.html#) | Exception thrown when an app tries to start a background `https://developer.android.com/reference/kotlin/android/app/Service.html#` when it's not allowed to do so. | | [BadParcelableException](https://developer.android.com/reference/kotlin/android/os/BadParcelableException.html#) | Exception thrown when a `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#` is malformed or otherwise invalid. | | [CancellationException](https://developer.android.com/reference/kotlin/java/util/concurrent/CancellationException.html#) | Exception indicating that the result of a value-producing task, such as a `https://developer.android.com/reference/kotlin/java/util/concurrent/FutureTask.html#`, cannot be retrieved because the task was cancelled. | | [CancelledKeyException](https://developer.android.com/reference/kotlin/java/nio/channels/CancelledKeyException.html#) | Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid. | | [ClosedDirectoryStreamException](https://developer.android.com/reference/kotlin/java/nio/file/ClosedDirectoryStreamException.html#) | Unchecked exception thrown when an attempt is made to invoke an operation on a directory stream that is closed. | | [ClosedFileSystemException](https://developer.android.com/reference/kotlin/java/nio/file/ClosedFileSystemException.html#) | Unchecked exception thrown when an attempt is made to invoke an operation on a file and the file system is closed. | | [ClosedSelectorException](https://developer.android.com/reference/kotlin/java/nio/channels/ClosedSelectorException.html#) | Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector. | | [ClosedWatchServiceException](https://developer.android.com/reference/kotlin/java/nio/file/ClosedWatchServiceException.html#) | Unchecked exception thrown when an attempt is made to invoke an operation on a watch service that is closed. | | [ConnectionPendingException](https://developer.android.com/reference/kotlin/java/nio/channels/ConnectionPendingException.html#) | Unchecked exception thrown when an attempt is made to connect a `https://developer.android.com/reference/kotlin/java/nio/channels/SocketChannel.html#` for which a non-blocking connection operation is already in progress. | | [CursorIndexOutOfBoundsException](https://developer.android.com/reference/kotlin/android/database/CursorIndexOutOfBoundsException.html#) | An exception indicating that a cursor is out of bounds. | | [DateTimeParseException](https://developer.android.com/reference/kotlin/java/time/format/DateTimeParseException.html#) | An exception thrown when an error occurs during parsing. | | [DirectoryIteratorException](https://developer.android.com/reference/kotlin/java/nio/file/DirectoryIteratorException.html#) | Runtime exception thrown if an I/O error is encountered when iterating over the entries in a directory. | | [DuplicateFormatFlagsException](https://developer.android.com/reference/kotlin/java/util/DuplicateFormatFlagsException.html#) | Unchecked exception thrown when duplicate flags are provided in the format specifier. | | [ForegroundServiceStartNotAllowedException](https://developer.android.com/reference/kotlin/android/app/ForegroundServiceStartNotAllowedException.html#) | Exception thrown when an app tries to start a foreground `https://developer.android.com/reference/kotlin/android/app/Service.html#` when it's not allowed to do so. | | [ForegroundServiceTypeException](https://developer.android.com/reference/kotlin/android/app/ForegroundServiceTypeException.html#) | Base exception thrown when an app tries to start a foreground `https://developer.android.com/reference/kotlin/android/app/Service.html#` without a valid type. | | [FormatFlagsConversionMismatchException](https://developer.android.com/reference/kotlin/java/util/FormatFlagsConversionMismatchException.html#) | Unchecked exception thrown when a conversion and flag are incompatible. | | [FormatterClosedException](https://developer.android.com/reference/kotlin/java/util/FormatterClosedException.html#) | Unchecked exception thrown when the formatter has been closed. | | [Fragment.InstantiationException](https://developer.android.com/reference/kotlin/android/app/Fragment.InstantiationException.html#) | Thrown by `https://developer.android.com/reference/kotlin/android/app/Fragment.html#instantiate(android.content.Context,%20kotlin.String,%20android.os.Bundle)` when there is an instantiation failure. | | [IllegalBlockingModeException](https://developer.android.com/reference/kotlin/java/nio/channels/IllegalBlockingModeException.html#) | Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode. | | [IllegalChannelGroupException](https://developer.android.com/reference/kotlin/java/nio/channels/IllegalChannelGroupException.html#) | Unchecked exception thrown when an attempt is made to open a channel in a group that was not created by the same provider. | | [IllegalCharsetNameException](https://developer.android.com/reference/kotlin/java/nio/charset/IllegalCharsetNameException.html#) | Unchecked exception thrown when a string that is not a [legal charset name](https://developer.android.com/reference/kotlin/java/nio/charset/Charset.html#names) is used as such. | | [IllegalFormatCodePointException](https://developer.android.com/reference/kotlin/java/util/IllegalFormatCodePointException.html#) | Unchecked exception thrown when a character with an invalid Unicode code point as defined by `https://developer.android.com/reference/kotlin/java/lang/Character#isValidCodePoint(kotlin.Int)` is passed to the `https://developer.android.com/reference/kotlin/java/util/Formatter.html#`. | | [IllegalFormatConversionException](https://developer.android.com/reference/kotlin/java/util/IllegalFormatConversionException.html#) | Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type. | | [IllegalFormatException](https://developer.android.com/reference/kotlin/java/util/IllegalFormatException.html#) | Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments. | | [IllegalFormatFlagsException](https://developer.android.com/reference/kotlin/java/util/IllegalFormatFlagsException.html#) | Unchecked exception thrown when an illegal combination flags is given. | | [IllegalFormatPrecisionException](https://developer.android.com/reference/kotlin/java/util/IllegalFormatPrecisionException.html#) | Unchecked exception thrown when the precision is a negative value other than `-1`, the conversion does not support a precision, or the value is otherwise unsupported. | | [IllegalFormatWidthException](https://developer.android.com/reference/kotlin/java/util/IllegalFormatWidthException.html#) | Unchecked exception thrown when the format width is a negative value other than `-1` or is otherwise unsupported. | | [IllegalSelectorException](https://developer.android.com/reference/kotlin/java/nio/channels/IllegalSelectorException.html#) | Unchecked exception thrown when an attempt is made to register a channel with a selector that was not created by the provider that created the channel. | | [IllegalThreadStateException](https://developer.android.com/reference/kotlin/java/lang/IllegalThreadStateException) | Thrown to indicate that a thread is not in an appropriate state for the requested operation. | | [InfeasibleActivityOptionsException](https://developer.android.com/reference/kotlin/android/app/InfeasibleActivityOptionsException.html#) | This exception is thrown when a call to android. | | [InlineExecutionProhibitedException](https://developer.android.com/reference/kotlin/android/net/http/InlineExecutionProhibitedException.html#) | Thrown when an executor runs a submitted runnable inline in `https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#execute(java.lang.Runnable)` and `https://developer.android.com/reference/kotlin/android/net/http/UrlRequest.Builder.html#setDirectExecutorAllowed(kotlin.Boolean)` was not called. | | [InputMismatchException](https://developer.android.com/reference/kotlin/java/util/InputMismatchException.html#) | Thrown by a `Scanner` to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type. | | [InvalidForegroundServiceTypeException](https://developer.android.com/reference/kotlin/android/app/InvalidForegroundServiceTypeException.html#) | Exception thrown when an app tries to start a foreground `https://developer.android.com/reference/kotlin/android/app/Service.html#` with an invalid type. | | [InvalidMarkException](https://developer.android.com/reference/kotlin/java/nio/InvalidMarkException.html#) | Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined. | | [InvalidParameterException](https://developer.android.com/reference/kotlin/java/security/InvalidParameterException.html#) | This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method. | | [InvalidPathException](https://developer.android.com/reference/kotlin/java/nio/file/InvalidPathException.html#) | Unchecked exception thrown when path string cannot be converted into a `https://developer.android.com/reference/kotlin/java/nio/file/Path.html#` because the path string contains invalid characters, or the path string is invalid for other file system specific reasons. | | [KeyCharacterMap.UnavailableException](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.UnavailableException.html#) | Thrown by `https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.html#load(kotlin.Int)` when a key character map could not be loaded. | | [LimitExceededException](https://developer.android.com/reference/kotlin/android/os/LimitExceededException.html#) | Indicates that the app has exceeded a limit set by the System. | | [MediaCasStateException](https://developer.android.com/reference/kotlin/android/media/MediaCasStateException.html#) | Base class for MediaCas runtime exceptions | | [MediaCodec.CodecException](https://developer.android.com/reference/kotlin/android/media/MediaCodec.CodecException.html#) | Thrown when an internal codec error occurs. | | [MediaDrm.MediaDrmStateException](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MediaDrmStateException.html#) | Thrown when a general failure occurs during a MediaDrm operation. | | [MediaDrmResetException](https://developer.android.com/reference/kotlin/android/media/MediaDrmResetException.html#) | This exception is thrown when the MediaDrm instance has become unusable due to a restart of the mediaserver process. | | [MissingForegroundServiceTypeException](https://developer.android.com/reference/kotlin/android/app/MissingForegroundServiceTypeException.html#) | Exception thrown when an app tries to start a foreground `https://developer.android.com/reference/kotlin/android/app/Service.html#` without a type. | | [MissingFormatArgumentException](https://developer.android.com/reference/kotlin/java/util/MissingFormatArgumentException.html#) | Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist. | | [MissingFormatWidthException](https://developer.android.com/reference/kotlin/java/util/MissingFormatWidthException.html#) | Unchecked exception thrown when the format width is required. | | [NoConnectionPendingException](https://developer.android.com/reference/kotlin/java/nio/channels/NoConnectionPendingException.html#) | Unchecked exception thrown when the `https://developer.android.com/reference/kotlin/java/nio/channels/SocketChannel.html#finishConnect()` method of a `https://developer.android.com/reference/kotlin/java/nio/channels/SocketChannel.html#` is invoked without first successfully invoking its `https://developer.android.com/reference/kotlin/java/nio/channels/SocketChannel.html#connect(java.net.SocketAddress)` method. | | [NonReadableChannelException](https://developer.android.com/reference/kotlin/java/nio/channels/NonReadableChannelException.html#) | Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading. | | [NonWritableChannelException](https://developer.android.com/reference/kotlin/java/nio/channels/NonWritableChannelException.html#) | Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing. | | [NotYetBoundException](https://developer.android.com/reference/kotlin/java/nio/channels/NotYetBoundException.html#) | Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a server socket channel that is not yet bound. | | [NotYetConnectedException](https://developer.android.com/reference/kotlin/java/nio/channels/NotYetConnectedException.html#) | Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected. | | [NumberFormatException](https://developer.android.com/reference/kotlin/java/lang/NumberFormatException) | Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format. | | [OverlappingFileLockException](https://developer.android.com/reference/kotlin/java/nio/channels/OverlappingFileLockException.html#) | Unchecked exception thrown when an attempt is made to acquire a lock on a region of a file that overlaps a region already locked by the same Java virtual machine, or when another thread is already waiting to lock an overlapping region of the same file. | | [PatternSyntaxException](https://developer.android.com/reference/kotlin/java/util/regex/PatternSyntaxException.html#) | Unchecked exception thrown to indicate a syntax error in a regular-expression pattern. | | [ProviderMismatchException](https://developer.android.com/reference/kotlin/java/nio/file/ProviderMismatchException.html#) | Unchecked exception thrown when an attempt is made to invoke a method on an object created by one file system provider with a parameter created by a different file system provider. | | [RSDriverException](https://developer.android.com/reference/kotlin/android/renderscript/RSDriverException.html#) | Base class for all exceptions thrown by the Android RenderScript | | [RSIllegalArgumentException](https://developer.android.com/reference/kotlin/android/renderscript/RSIllegalArgumentException.html#) | Base class for all exceptions thrown by the Android RenderScript | | [RSInvalidStateException](https://developer.android.com/reference/kotlin/android/renderscript/RSInvalidStateException.html#) | Base class for all exceptions thrown by the Android RenderScript | | [ReadOnlyBufferException](https://developer.android.com/reference/kotlin/java/nio/ReadOnlyBufferException.html#) | Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer. | | [ReadOnlyFileSystemException](https://developer.android.com/reference/kotlin/java/nio/file/ReadOnlyFileSystemException.html#) | Unchecked exception thrown when an attempt is made to update an object associated with a `https://developer.android.com/reference/kotlin/java/nio/file/FileSystem.html#isReadOnly()` `FileSystem`. | | [ReadPendingException](https://developer.android.com/reference/kotlin/java/nio/channels/ReadPendingException.html#) | Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed. | | [ReceiverCallNotAllowedException](https://developer.android.com/reference/kotlin/android/content/ReceiverCallNotAllowedException.html#) | This exception is thrown from android. | | [RecoverableSecurityException](https://developer.android.com/reference/kotlin/android/app/RecoverableSecurityException.html#) | Specialization of `https://developer.android.com/reference/kotlin/java/lang/SecurityException` that contains additional information about how to involve the end user to recover from the exception. | | [SQLiteAbortException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteAbortException.html#) | An exception that indicates that the SQLite program was aborted. | | [SQLiteAccessPermException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteAccessPermException.html#) | This exception class is used when sqlite can't access the database file due to lack of permissions on the file. | | [SQLiteBindOrColumnIndexOutOfRangeException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteBindOrColumnIndexOutOfRangeException.html#) | Thrown if the bind or column parameter index is out of range. | | [SQLiteBlobTooBigException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteBlobTooBigException.html#) | <br /> | | [SQLiteCantOpenDatabaseException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteCantOpenDatabaseException.html#) | <br /> | | [SQLiteConstraintException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteConstraintException.html#) | An exception that indicates that an integrity constraint was violated. | | [SQLiteDatabaseCorruptException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatabaseCorruptException.html#) | An exception that indicates that the SQLite database file is corrupt. | | [SQLiteDatabaseLockedException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatabaseLockedException.html#) | Thrown if the database engine was unable to acquire the database locks it needs to do its job. | | [SQLiteDatatypeMismatchException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatatypeMismatchException.html#) | <br /> | | [SQLiteDiskIOException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDiskIOException.html#) | Indicates that an IO error occurred while accessing the SQLite database file. | | [SQLiteDoneException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDoneException.html#) | An exception that indicates that the SQLite program is done. | | [SQLiteException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteException.html#) | A SQLite exception that indicates there was an error with SQL parsing or execution. | | [SQLiteFullException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteFullException.html#) | An exception that indicates that the SQLite database is full. | | [SQLiteMisuseException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteMisuseException.html#) | This error can occur if the application creates a SQLiteStatement object and allows multiple threads in the application use it at the same time. | | [SQLiteOutOfMemoryException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteOutOfMemoryException.html#) | <br /> | | [SQLiteReadOnlyDatabaseException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteReadOnlyDatabaseException.html#) | <br /> | | [SQLiteTableLockedException](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteTableLockedException.html#) | <br /> | | [SecureKeyImportUnavailableException](https://developer.android.com/reference/kotlin/android/security/keystore/SecureKeyImportUnavailableException.html#) | Indicates that the Keystore does not support securely importing wrapped keys. | | [ServiceStartNotAllowedException](https://developer.android.com/reference/kotlin/android/app/ServiceStartNotAllowedException.html#) | Exception thrown when an app tries to start a `https://developer.android.com/reference/kotlin/android/app/Service.html#` when it's not allowed to do so. | | [ShutdownChannelGroupException](https://developer.android.com/reference/kotlin/java/nio/channels/ShutdownChannelGroupException.html#) | Unchecked exception thrown when an attempt is made to construct a channel in a group that is shutdown or the completion handler for an I/O operation cannot be invoked because the channel group has terminated. | | [SkeletonSyntaxException](https://developer.android.com/reference/kotlin/android/icu/number/SkeletonSyntaxException.html#) | Exception used for illegal number skeleton strings. | | [StartForegroundCalledOnStoppedServiceException](https://developer.android.com/reference/kotlin/android/app/StartForegroundCalledOnStoppedServiceException.html#) | Exception thrown when android. | | [StringIndexOutOfBoundsException](https://developer.android.com/reference/kotlin/java/lang/StringIndexOutOfBoundsException) | Thrown by `String` methods to indicate that an index is either negative or greater than the size of the string. | | [StrongBoxUnavailableException](https://developer.android.com/reference/kotlin/android/security/keystore/StrongBoxUnavailableException.html#) | Indicates that an operation could not be performed because the requested security hardware is not available. | | [SystemUpdatePolicy.ValidationFailedException](https://developer.android.com/reference/kotlin/android/app/admin/SystemUpdatePolicy.ValidationFailedException.html#) | An exception class that represents various validation errors thrown from `https://developer.android.com/reference/kotlin/android/app/admin/SystemUpdatePolicy.html#setFreezePeriods(kotlin.collections.MutableList)` and `https://developer.android.com/reference/kotlin/android/app/admin/DevicePolicyManager.html#setSystemUpdatePolicy(android.content.ComponentName,%20android.app.admin.SystemUpdatePolicy)` | | [UnknownFormatConversionException](https://developer.android.com/reference/kotlin/java/util/UnknownFormatConversionException.html#) | Unchecked exception thrown when an unknown conversion is given. | | [UnknownFormatFlagsException](https://developer.android.com/reference/kotlin/java/util/UnknownFormatFlagsException.html#) | Unchecked exception thrown when an unknown flag is given. | | [UnresolvedAddressException](https://developer.android.com/reference/kotlin/java/nio/channels/UnresolvedAddressException.html#) | Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address. | | [UnsafeStateException](https://developer.android.com/reference/kotlin/android/app/admin/UnsafeStateException.html#) | Exception thrown when a `https://developer.android.com/reference/kotlin/android/app/admin/DevicePolicyManager.html#` operation failed because it was not safe to be executed at that moment. | | [UnsupportedAddressTypeException](https://developer.android.com/reference/kotlin/java/nio/channels/UnsupportedAddressTypeException.html#) | Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported. | | [UnsupportedCharsetException](https://developer.android.com/reference/kotlin/java/nio/charset/UnsupportedCharsetException.html#) | Unchecked exception thrown when no support is available for a requested charset. | | [UnsupportedTemporalTypeException](https://developer.android.com/reference/kotlin/java/time/temporal/UnsupportedTemporalTypeException.html#) | UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class. | | [WritePendingException](https://developer.android.com/reference/kotlin/java/nio/channels/WritePendingException.html#) | Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed. | | [ZoneRulesException](https://developer.android.com/reference/kotlin/java/time/zone/ZoneRulesException.html#) | Thrown to indicate a problem with time-zone configuration. | |

`RuntimeException` is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.

`RuntimeException` and its subclasses are *unchecked exceptions* . Unchecked exceptions do *not* need to be declared in a method or constructor's `throws` clause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/java/lang/RuntimeException#RuntimeException()()` Constructs a new runtime exception with `null` as its detail message. |
| `https://developer.android.com/reference/kotlin/java/lang/RuntimeException#RuntimeException(kotlin.String)(message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!)` Constructs a new runtime exception with the specified detail message. |
| `https://developer.android.com/reference/kotlin/java/lang/RuntimeException#RuntimeException(kotlin.String,%20kotlin.Throwable)(message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!, cause: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!)` Constructs a new runtime exception with the specified detail message and cause. |
| `https://developer.android.com/reference/kotlin/java/lang/RuntimeException#RuntimeException(kotlin.Throwable)(cause: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!)` Constructs a new runtime exception with the specified cause and a detail message of `(cause==null ? null : cause.toString())` (which typically contains the class and detail message of `cause`). |

| Protected constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/java/lang/RuntimeException#RuntimeException(kotlin.String,%20kotlin.Throwable,%20kotlin.Boolean,%20kotlin.Boolean)(message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!, cause: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!, enableSuppression: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, writableStackTrace: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Constructs a new runtime exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled. |

## Public constructors

### RuntimeException

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
RuntimeException()
```

Constructs a new runtime exception with `null` as its detail message. The cause is not initialized, and may subsequently be initialized by a call to `https://developer.android.com/reference/kotlin/java/lang/Throwable#initCause(kotlin.Throwable)`.

### RuntimeException

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
RuntimeException(message: String!)
```

Constructs a new runtime exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to `https://developer.android.com/reference/kotlin/java/lang/Throwable#initCause(kotlin.Throwable)`.

| Parameters ||
|---|---|
| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message. The detail message is saved for later retrieval by the `https://developer.android.com/reference/kotlin/java/lang/Throwable#getMessage()` method. |

### RuntimeException

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
RuntimeException(
    message: String!, 
    cause: Throwable!)
```

Constructs a new runtime exception with the specified detail message and cause.

Note that the detail message associated with `cause` is *not* automatically incorporated in this runtime exception's detail message.

| Parameters ||
|---|---|
| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message (which is saved for later retrieval by the `https://developer.android.com/reference/kotlin/java/lang/Throwable#getMessage()` method). |
| `cause` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!: the cause (which is saved for later retrieval by the `https://developer.android.com/reference/kotlin/java/lang/Throwable#getCause()` method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) |

### RuntimeException

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
RuntimeException(cause: Throwable!)
```

Constructs a new runtime exception with the specified cause and a detail message of `(cause==null ? null : cause.toString())` (which typically contains the class and detail message of `cause`). This constructor is useful for runtime exceptions that are little more than wrappers for other throwables.

| Parameters ||
|---|---|
| `cause` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!: the cause (which is saved for later retrieval by the `https://developer.android.com/reference/kotlin/java/lang/Throwable#getCause()` method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) |

## Protected constructors

### RuntimeException

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
protected RuntimeException(
    message: String!, 
    cause: Throwable!, 
    enableSuppression: Boolean, 
    writableStackTrace: Boolean)
```

Constructs a new runtime exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.

| Parameters ||
|---|---|
| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message. |
| `cause` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!: the cause. (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) |
| `enableSuppression` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): whether or not suppression is enabled or disabled |
| `writableStackTrace` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): whether or not the stack trace should be writable |