# LoadSdkCompatException

Artifact: [androidx.privacysandbox.sdkruntime:sdkruntime-core](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime) [View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException.kt+class:androidx.privacysandbox.sdkruntime.core.LoadSdkCompatException) Added in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19) Deprecated in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)

*** ** * ** ***


```
public final class LoadSdkCompatException extends Exception
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.privacysandbox.sdkruntime.core.LoadSdkCompatException](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> This library is no longer supported.

Compat alternative for `https://developer.android.com/reference/android/app/sdksandbox/LoadSdkException.html`. Thrown from `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/SandboxedSdkProviderCompat#onLoadSdk(android.os.Bundle)`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/LoadSdkException.html` |   |

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LOAD_SDK_ALREADY_LOADED() = 101` **This field is deprecated.** This library is no longer supported. |
| `static final int` | `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LOAD_SDK_INTERNAL_ERROR() = 500` **This field is deprecated.** This library is no longer supported. |
| `static final int` | `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LOAD_SDK_NOT_FOUND() = 100` **This field is deprecated.** This library is no longer supported. |
| `static final int` | `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LOAD_SDK_SDK_DEFINED_ERROR() = 102` **This field is deprecated.** This library is no longer supported. |
| `static final int` | `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LOAD_SDK_SDK_SANDBOX_DISABLED() = 103` **This field is deprecated.** This library is no longer supported. |
| `static final int` | `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#SDK_SANDBOX_PROCESS_NOT_AVAILABLE() = 503` **This field is deprecated.** This library is no longer supported. |

| ### Public constructors |
|---|
| `[LoadSdkCompatException](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LoadSdkCompatException(kotlin.Throwable,android.os.Bundle))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html extraInfo)` **This method is deprecated.** This library is no longer supported. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `[getExtraInformation](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#getExtraInformation())()` **This method is deprecated.** This library is no longer supported. |
| `final int` | `[getLoadSdkErrorCode](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#getLoadSdkErrorCode())()` **This method is deprecated.** This library is no longer supported. |

### Inherited methods

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `final void` `[addSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html exception)`

**This method is deprecated.** This library is no longer supported.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `[fillInStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace())()`

**This method is deprecated.** This library is no longer supported.
`https://developer.android.com/reference/java/lang/Throwable.html` `[getCause](https://developer.android.com/reference/java/lang/Throwable.html#getCause())()`

**This method is deprecated.** This library is no longer supported.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/annotation/RecentlyNullable
[getLocalizedMessage](https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage())()`

**This method is deprecated.** This library is no longer supported.
`https://developer.android.com/reference/java/lang/String.html` `[getMessage](https://developer.android.com/reference/java/lang/Throwable.html#getMessage())()`

**This method is deprecated.** This library is no longer supported.
`@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
[getStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace())()`

**This method is deprecated.** This library is no longer supported.
`final @https://developer.android.com/reference/androidx/annotation/NonNull Throwable[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
[getSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed())()`

**This method is deprecated.** This library is no longer supported.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `[initCause](https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause)`

**This method is deprecated.** This library is no longer supported.
`void` `[printStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace())()`

**This method is deprecated.** This library is no longer supported.
`void` `[printStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintStream))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintStream.html s)`

**This method is deprecated.** This library is no longer supported.
`void` `[printStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html s)`

**This method is deprecated.** This library is no longer supported.
`void` `[setStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[]))(@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[] stackTrace)`

**This method is deprecated.** This library is no longer supported.

## Constants

### LOAD_SDK_ALREADY_LOADED

```
public static final int LOAD_SDK_ALREADY_LOADED = 101
```

> [!CAUTION]
> **This field is deprecated.**   
> This library is no longer supported.

SDK is already loaded.

This indicates that client application tried to reload the same SDK after being successfully loaded.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager.html#LOAD_SDK_ALREADY_LOADED` |   |

### LOAD_SDK_INTERNAL_ERROR

```
public static final int LOAD_SDK_INTERNAL_ERROR = 500
```

> [!CAUTION]
> **This field is deprecated.**   
> This library is no longer supported.

Internal error while loading SDK.

This indicates a generic internal error happened while applying the call from client application.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager.html#LOAD_SDK_INTERNAL_ERROR` |   |

### LOAD_SDK_NOT_FOUND

```
public static final int LOAD_SDK_NOT_FOUND = 100
```

> [!CAUTION]
> **This field is deprecated.**   
> This library is no longer supported.

SDK not found.

This indicates that client application tried to load a non-existing SDK.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager.html#LOAD_SDK_NOT_FOUND` |   |

### LOAD_SDK_SDK_DEFINED_ERROR

```
public static final int LOAD_SDK_SDK_DEFINED_ERROR = 102
```

> [!CAUTION]
> **This field is deprecated.**   
> This library is no longer supported.

SDK error after being loaded.

This indicates that the SDK encountered an error during post-load initialization. The details of this can be obtained from the Bundle returned in `https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager.html#LOAD_SDK_SDK_DEFINED_ERROR` |   |

### LOAD_SDK_SDK_SANDBOX_DISABLED

```
public static final int LOAD_SDK_SDK_SANDBOX_DISABLED = 103
```

> [!CAUTION]
> **This field is deprecated.**   
> This library is no longer supported.

SDK sandbox is disabled.

This indicates that the SDK sandbox is disabled. Any subsequent attempts to load SDKs in this boot will also fail.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager.html#LOAD_SDK_SDK_SANDBOX_DISABLED` |   |

### SDK_SANDBOX_PROCESS_NOT_AVAILABLE

```
public static final int SDK_SANDBOX_PROCESS_NOT_AVAILABLE = 503
```

> [!CAUTION]
> **This field is deprecated.**   
> This library is no longer supported.

Sdk sandbox process is not available.

This indicates that the sdk sandbox process is not available, either because it has died, disconnected or was not created in the first place.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager.html#SDK_SANDBOX_PROCESS_NOT_AVAILABLE` |   |

## Public constructors

### LoadSdkCompatException

Added in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19) Deprecated in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)

```
public [LoadSdkCompatException](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#LoadSdkCompatException(kotlin.Throwable,android.os.Bundle))(@NonNull Throwable cause, @NonNull Bundle extraInfo)
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

Initializes a LoadSdkCompatException with a Throwable and a Bundle.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause` | The cause of the exception. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html extraInfo` | Extra error information. This is empty if there is no such information. |

## Public methods

### getExtraInformation

Added in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19) Deprecated in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)

```
public final @NonNull Bundle [getExtraInformation](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#getExtraInformation())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

Extra error information this exception was constructed with.

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/LoadSdkException.html#getExtraInformation()` |   |

### getLoadSdkErrorCode

Added in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19) Deprecated in [1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)

```
public final int [getLoadSdkErrorCode](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/LoadSdkCompatException#getLoadSdkErrorCode())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

Result code this exception was constructed with.

Value is one of the following:

- `503`
- `100`
- `101`
- `102`
- `103`
- `500`

<br />

| See also |
|---|---|
| `https://developer.android.com/reference/android/app/sdksandbox/LoadSdkException.html#getLoadSdkErrorCode()` |   |