Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions runtimes/react-native/error-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,24 @@ import { RiveView, RiveErrorType } from "@rive-app/react-native";
If no `onError` handler is provided, errors will be logged to the console by
default.
</Note>

### Android Runtime Initialization

On Android, the Rive native library is automatically initialized at app startup. In rare cases (ABI mismatch, missing native libraries, etc.), this initialization can fail. Use `RiveRuntime.getStatus()` to check whether initialization succeeded:

```ts
import { RiveRuntime } from '@rive-app/react-native';

const { isInitialized, error } = RiveRuntime.getStatus();
if (!isInitialized) {
console.error('Rive failed to initialize:', error);
}
```

<Note>
On iOS, the runtime requires no explicit initialization — `getStatus()` will always return `{ isInitialized: true }`.
</Note>

<Warning>
**Advanced:** If you need full control over when initialization happens, you can disable automatic initialization by adding `Rive_RiveRuntimeAndroidSkipSetup=true` to `android/gradle.properties` and calling `RiveRuntime.initialize()` yourself. This is not recommended for most apps — only use this if you have a specific reason to defer initialization.
</Warning>